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]Different color for each bar in Vertical Bar chart

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Different color for each bar in Vertical Bar chart
 Login/Join
 
Platinum Member
posted
How can I give different color for each BAR?

GRAPH FILE CAR
SUM
DEALER_COST
BY COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 500
ON GRAPH SET VAXIS 220
ON GRAPH SET GRWIDTH 1
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
-*ON GRAPH SET GTREND ON
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET STYLE *
TYPE=HEADING, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=10, STYLE=BOLD,COLOR=RGB(128 128 128), $
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
-*setFrameDisplay(false);
setColorMode(2);
setFillColor(getGroup(0),new Color(128,128,255));
setFillColor(getGroup(1),new Color(158,224,191));
setFillColor(getGroup(2),new Color(128,128,255));
-*setPlace(true);
*END

ENDSTYLE
END
-RUN

This message has been edited. Last edited by: <Emily McAllister>,


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report This Post
Expert
posted Hide Post
Running your code, I see different colours...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
quote:
Originally posted by Francis Mariani:
Running your code, I see different colours...

I was scratching my head about that, too.

I can only assume the request is: "How can I change the default colors?"


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Expert
posted Hide Post


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Yes, it is showing different colors but I want to get the colors like below.

England, France - Blue color
Italy - Red color
Japan, Germany - Yellow color.


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report This Post
Expert
posted Hide Post
Use setFillColor(getSeries(n):
setFillColor(getSeries(0),new Color(0,0,255));
setFillColor(getSeries(1),new Color(255,0,0));
setFillColor(getSeries(2),new Color(0,255,0));
setFillColor(getSeries(3),new Color(0,255,255));
setFillColor(getSeries(4),new Color(255,0,255));


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Thanks Francis.

The trick is adding setColorMode(2) and setFillColor(getSeries(n)) works.

I didn't had the setColorMode(2) when I use the series color.


8.2.06
Windows, All Formats
 
Posts: 184 | Registered: December 27, 2013Report 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]Different color for each bar in Vertical Bar chart

Copyright © 1996-2020 Information Builders