Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Pie Chart Slice Color

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Pie Chart Slice Color
 Login/Join
 
Platinum Member
posted
Hi all
i have Some Doubts in my Pie Chart.here my Requirement is i want to do each slice having differenet color. i want to put my custom colors on each slice. i want API for this.



Thanks
Kalyan
 
Posts: 155 | Location: Bangalore. | Registered: January 24, 2006Report This Post
Platinum Member
posted Hide Post
You would put the following commands within your graphstyle I believe:

ON GRAPH SET GRAPHSTYLE *
setFillColor(getSeries(0),new Color(0,0,255)); blue
setFillColor(getSeries(1),new Color(0 255 0)); lime green
setFillColor(getSeries(2),new Color(255,0,255)); fuscia
setFillColor(getSeries(3),new Color(255,255,0)); yellow
setFillColor(getSeries(4),new Color(0,255,255)); aqua
setFillColor(getSeries(5),new Color(50,153,204)); sky blue
setFillColor(getSeries(6),new Color(255,0,0)); red

To determine colors, Susannah has created a document that is called Excel Colorname Key – What Is "Indian Red," Anyway (works for graphs). You can find this as you go into focal point in the developer center in the focus on developers section. Hope this helps.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Silver Member
posted Hide Post
To keep our colors consistent we put the setFillColor lines (about 20 of them) into a file on the WF Client server and put an include statement in our pie charts.

"setTemplateFile("/images/tdg/template/MALFillColors.txt");"

That also has the advantage of being able to change the colors for all the reports in one place if at some point the users decide they think your shade of yellow is just too bright.
 
Posts: 41 | Registered: January 06, 2006Report This Post
Member
posted Hide Post
What do you do to prevent having 2 slices that are the same color next to each other. If you have 8 slices of pie there will be 2 the same color. Is there a way to prevent this.

This message has been edited. Last edited by: isjhb,
 
Posts: 21 | Registered: April 20, 2004Report This Post
Platinum Member
posted Hide Post
I second the suggestions from Pam & EJL.

We have the following piece of graph color stylesheet commands in a member by itself and
-INCLUDE this member in the stylesheet area of the fex, whenever we generate graphs (Bar or Pie).

ON TABLE SET STYLE *
-INCLUDE OURSTYLE
-*-* other local S-S commands
ENDSTYLE


setFillColor(getSeries(0), new Color(0,0,255));
setFillColor(getSeries(1), new Color(0,255,0));
setFillColor(getSeries(2), new Color(255,0,255));
setFillColor(getSeries(3), new Color(255,255,0));
setFillColor(getSeries(4), new Color(255,0,0));
setFillColor(getSeries(5), new Color(255,165,0));
setFillColor(getSeries(6), new Color(255,192,203));
setFillColor(getSeries(7), new Color(0,255,255));
setFillColor(getSeries(8), new Color(206,0,54));
setFillColor(getSeries(9), new Color(255,239,0));
setFillColor(getSeries(10), new Color(0,152,82));

You could play around with the color palette and come up with your own RGB values. This example gives you 11 custom colors. If you need more, you just keep repeating the lines with an ascending getSeries(xx) value and new RGBs.
Hope that helps !!
Sandeep.

This message has been edited. Last edited by: BlueZone,


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
 
Posts: 218 | Location: Jackson, MS | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Pie Chart Slice Color

Copyright © 1996-2020 Information Builders