Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] WF8 HTML5 graph templates
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] WF8 HTML5 graph templates
 Login/Join
 
Member
posted
This is for WebFOCUS 8 HTML5 graph question. Is there a way to select a template or customize the bar colors in a graph? If I have 20 or more legends, the colors starts to look alike.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 12 | Registered: March 06, 2012Reply With QuoteReport This Post
Expert
posted Hide Post
Hi Hans,

When you are creating your chart using the GUI in WF8, on the home tab there is a "theme" button. This will allow you to choose a predefined theme - either sample or custom.

If you look at the ENBlue_theme.sty file (for example) you will see that there are 64 series colours declared.

If you wish to use your own then I would suggest using one of the samples as a base. Copy it to your app folder and makes changes.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5659 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Member
posted Hide Post
Thank you! That worked!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 12 | Registered: March 06, 2012Reply With QuoteReport This Post
Master
posted Hide Post
Thought I would add to this great thread, as I've been looking at this type of thing as well.

I found a very interesting Stack Exchange article on color differentiation here: http://graphicdesign.stackexch...y-datasets-on-a-plot
http://graphicdesign.stackexch...com/revisions/3815/8

Accordingly, here is a scenario, where we call our standard stylesheet, that comes with WFDS, but then override the series colors, using the hex codes from stack exchange:
DEFINE FILE GGSALES
 AMOUNT/I5 = 100;
END
-*
GRAPH FILE GGSALES
 SUM AMOUNT   AS 'Amount'
 BY  SEQ_NO   AS 'Sequence'
 IF  SEQ_NO   LE 22
 ON GRAPH PCHOLD FORMAT JSCHART
 ON GRAPH SET LOOKGRAPH VBAR
 ON GRAPH SET AUTOFIT ON
-*
ON GRAPH SET STYLE *
INCLUDE = ENgradient_combine, $
*GRAPH_SCRIPT
 setColorMode(2);
*END
-* Maximally Distinct Colors from Stack Exchange Graphic Design.
*GRAPH_SCRIPT
 setFillColor(getSeries(0),new Color(#FFFF00));
 setFillColor(getSeries(1),new Color(#1CE6FF));
 setFillColor(getSeries(2),new Color(#FF34FF));
 setFillColor(getSeries(3),new Color(#FF4A46));
 setFillColor(getSeries(4),new Color(#008941));
 setFillColor(getSeries(5),new Color(#006FA6));
 setFillColor(getSeries(6),new Color(#A30059));
 setFillColor(getSeries(7),new Color(#FFDBE5));
 setFillColor(getSeries(8),new Color(#7A4900));
 setFillColor(getSeries(9),new Color(#0000A6));
 setFillColor(getSeries(10),new Color(#63FFAC));
 setFillColor(getSeries(11),new Color(#B79762));
 setFillColor(getSeries(12),new Color(#004D43));
 setFillColor(getSeries(13),new Color(#8FB0FF));
 setFillColor(getSeries(14),new Color(#997D87));
 setFillColor(getSeries(15),new Color(#5A0007));
 setFillColor(getSeries(16),new Color(#809693));
 setFillColor(getSeries(17),new Color(#1B4400));
 setFillColor(getSeries(18),new Color(#4FC601));
 setFillColor(getSeries(19),new Color(#3B5DFF));
 setFillColor(getSeries(20),new Color(#4A3B53));
 setFillColor(getSeries(21),new Color(#FF2F80));
*END
ENDSTYLE
END
-RUN 





Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 
Posts: 788 | Registered: April 23, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] WF8 HTML5 graph templates

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.