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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]How can you assign the highest series to a spec color in a Stacked Bar Graph?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How can you assign the highest series to a spec color in a Stacked Bar Graph?
 Login/Join
 
Guru
posted
Here is an GGSALES example of a stacked bar graph, single sum field stacked by Category. How can I assign the series with the highest summed number to a specific color in the graph?

GRAPH FILE GGSALES
SUM 
BUDDOLLARS       
BY CATEGORY      
ACROSS DATE AS ' '
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
ENDSTYLE
END  

This message has been edited. Last edited by: Don Garland,


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Master
posted Hide Post
Right click on that data point and select change color. You can also change from series to group and that will give each data point it's own color.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Master
posted Hide Post
quote:
Originally posted by Tomsweb:
First, run the code to view the chart. Then, right click on that data point and select change color. You can also change from series to group and that will give each data point it's own color.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
Hey Don,

Instead of summing BUDDOLLARS by CATEGORY, consider DEFINEing each CATEGORY individually, then summing them in whatever order you want the as follows:
DEFINE FILE GGSALES
Gifts_DOL/D20M  = IF CATEGORY EQ 'Gifts'  THEN BUDDOLLARS ELSE 0;
Food_DOL/D20M   = IF CATEGORY EQ 'Food'   THEN BUDDOLLARS ELSE 0;
Coffee_DOL/D20M = IF CATEGORY EQ 'Coffee' THEN BUDDOLLARS ELSE 0;
END
GRAPH FILE GGSALES
SUM Coffee_DOL
    Gifts_DOL
    Food_DOL
. . .
I'm sure that's work for you.

You can add "setFillColor(getSeries(0),new Color(0,255,0));" to change the series colors.

Just in case you want to programatically figure out the stack order, you can predetermine the order as a pre-process to see which category has the highest values and SUM them in that order. However, beware of doing that as the users may get used to seeing 'Coffee' in the bottom section, then when 'Gifts' out sell coffee it switches and that becomes confusing to the users.

You can see where I did that on my site, the Vendor Tracking Chart.

I hope this helps.
~ Doug

This message has been edited. Last edited by: Doug,
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
Yes, that did work. I asked the question badly though, It really wasn't the colors, it was arranging them in a certain order. Your example reminded me that I needed to make my own categories so that I could put them in the sequence I wanted to.

Now all I have to do is determine the 1st highest, 2nd highest and 3rd highest. I'll do that with a HOLD file before the chart and use variable in the GRAPH.

Toooo many 12 hour days in a row I guess.

Thanks Doug and Tom


WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report 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     [SOLVED]How can you assign the highest series to a spec color in a Stacked Bar Graph?

Copyright © 1996-2020 Information Builders