Focal Point
[CLOSED] Assign different color codes to series based on graph type selected

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9907065096

July 17, 2018, 11:52 AM
BI Dev
[CLOSED] Assign different color codes to series based on graph type selected
Hi Everyone,

I am trying to customize one of the webfocus default style sheets i.e. warm.sty for our infoassist users. Is there a way to customize in such way that different colors are assigned to series based on the graph type selected? For example, blaproperties is used for bar,line and area. Can I assign colors for series0 as blue, series1 as green and series 2 red for bar chart and series0 as green, series1 as red and series 2 as blue for area chart? Thanks in advance.
Regards
Bi Dev

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8105/8202
Windows
All Outputs
July 17, 2018, 04:04 PM
MartinY
As far as I know, you cannot dynamically know which output format as been selected by the user (or used at run time) from IA.

The best thing I can think of is to have different style sheet (warm_bar.sty, warm_area.sty) from which the user will have to select from when creating his/her report.
But it's a user selection, nothing automated.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
July 17, 2018, 05:07 PM
Doug
Actually, you can assign colors for
series0 as blue, series1 as green and series 2 red for bar chart and series0 as green, series1 as red and series 2 as blue for area chart. [b] If the chart type if in a DM Variable. If so, that variable can be used as follows:
. . .
-SET &Series0Color=DECODE &GraphType.EVAL ('Bar' '0,0,255' 'Area' '0,255,0' 'Line' '255,0,0') ;
-* Do this for each Series / Chart Type
. . . 
setFillColor(getSeries(0),new Color(&Series0Color.EVAL));
. . .
-* Do this for each possible Series

I hope you can work with this...

Doug
July 18, 2018, 07:48 AM
MartinY
@Doug,

If the user is using InfoAssist to create its report as specified by BI Dev I'm interested to know how will you have the DM var &GraphType assigned ?

From a selection (from control in a HTML page as an example) where the available output type are listed I understand your idea, but from IA... I'm wondering how it could be possible to know what does the user have selected.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
July 19, 2018, 09:45 AM
BI Dev
Hi Doug,

Thanks for taking time to look into this, Is there anyway we can do this using infoassist?

quote:
Originally posted by Doug:
Actually, you can assign colors for
series0 as blue, series1 as green and series 2 red for bar chart and series0 as green, series1 as red and series 2 as blue for area chart. [b] If the chart type if in a DM Variable. If so, that variable can be used as follows:
. . .
-SET &Series0Color=DECODE &GraphType.EVAL ('Bar' '0,0,255' 'Area' '0,255,0' 'Line' '255,0,0') ;
-* Do this for each Series / Chart Type
. . . 
setFillColor(getSeries(0),new Color(&Series0Color.EVAL));
. . .
-* Do this for each possible Series

I hope you can work with this...

Doug



Webfocus 8105/8202
Windows
All Outputs
July 19, 2018, 09:52 AM
BI Dev
Hi Martin,

Thanks for your response. I understand your point, wondering if there is a way to automate it(if possible Smiler).

BI Dev

quote:
Originally posted by MartinY:
As far as I know, you cannot dynamically know which output format as been selected by the user (or used at run time) from IA.

The best thing I can think of is to have different style sheet (warm_bar.sty, warm_area.sty) from which the user will have to select from when creating his/her report.
But it's a user selection, nothing automated.



Webfocus 8105/8202
Windows
All Outputs
July 19, 2018, 11:41 AM
MartinY
@BI Dev,

This is my point : AFAIK it's not possible to automate that (knowing which output format has been selected by user from IA) and this is why I'm asking Doug how his option (DM var &GraphType) could be assigned using user selection from IA.
Maybe there is a way that I'm not aware.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007