Jump to content

Hi I have a simple pie chart that is reporting on data that ...


Brendan Yano

Recommended Posts

Hi I have a simple pie chart that is reporting on data that in development had 4 status:

Series 0 - ME,

Series 1 - No,

Series 2 - REF,

Series 3 -Yes

so I set the series to have the appropriate colours using Designer and it generated the code listed below. As you can see each series is only identified by the numeric value.

However in production that data source currently only has 2 (No, Yes) of the 4 status as we dont have any responses that generate the other two (ME,REF) So it is setting No to series 0, and Yes to series 1 which is causing the values to have the incorrect colours.

Is there a way to edit the code to be specific to the actual values and keep the correct colours defined in DEV even when some of the other status do not currently exist.

I know I could edit the series in prod so that yes and no are back to the correct colours but then I will have to edit them again when we receive responses that generate ME and REF.

Thanks

GRAPH_JS_FINAL

series: [

{

dataLabels: {

visible: true,

position: auto,

content: {{auto_percent}},

font: 22pt Sans-Serif

},

series: all

},

{

dataLabels: {

visible: true,

position: outside,

content: {{auto_percent}},

font: 16pt Sans-Serif

},

color: rgba(163, 73, 164, 1),

series: 0

},

{

dataLabels: {

visible: true,

position: outside,

content: {{auto_percent}},

font: 16pt Sans-Serif

},

color: rgba(237, 28, 36, 1),

series: 1

},

{

dataLabels: {

visible: true,

position: outside,

content: {{auto_percent}},

font: 16pt Sans-Serif

},

color: rgba(255, 242, 0, 1),

series: 2,

explodeSlice: 0.0

},

{

dataLabels: {

font: 16pt Sans-Serif

},

color: rgba(34, 177, 76, 1),

series: 3,

explodeSlice: 15.0

}

],

pieProperties: {

holeSize: 65%

}

*END

ENDSTYLE

Link to comment
Share on other sites

In case other people have encountered this, I was able to work with an Tibco resource today (thank you Dirk!) who was able to provide with a method to code this in designer (see below) they also let me know this functionality is available through the GUI in the latest release of Designer with conditional styling which functions much the same as the traffic light option in IA.

INCLUDE=IBFS:/WFC/Global/Themes/Standard/Default/theme.sty,$

TYPE=REPORT, TITLETEXT=Chart1, ORIENTATION=LANDSCAPE, ARREPORTSIZE=DIMENSION, ARFILTER_TARGET=*, ARGRAPHENGINE=JSCHART, $

TYPE=DATA, COLUMN=N1, BUCKET=color, $

TYPE=DATA, COLUMN=N2, BUCKET=measure, $

TYPE=DATA, COLUMN=N2, WHEN=N1 EQ ME, COLOR=RGB(163 73 164), $

TYPE=DATA, COLUMN=N2, WHEN=N1 EQ No, color=RGB(237 28 36), $

TYPE=DATA, COLUMN=N2, WHEN=N1 EQ REF, color=RGB(0 0 0) , $

TYPE=DATA, COLUMN=N2, WHEN=N1 EQ Yes, color=RGB(34 177 76), $

*GRAPH_SCRIPT

*GRAPH_JS_FINAL

series: [

{

dataLabels: {

visible: true,

position: outside,

content: {{metadata_value(default, dataLabels)}},

font: 28pt Sans-Serif

},

series: all

}

],

pieProperties: {

holeSize: 65%

}

Link to comment
Share on other sites

Yep - WHEN is the ticket.

Ive seen this pop up before and wondered if there were some additional parts we might add to the metadata (perhaps in the .acx file) that specifies colors for literal values.

I had a railroad customer once who was watching several railroads with graphs - the usual suspects like Union Pacific, Sante Fe, Burlington etc. We were able to use WHENs to make it so the graphs stayed consistent in their colors.

Just seems like there might be a way of specifying the colors in the master/acx descriptions to make it stay the same all the time. We just made a -INCLUDE that for that customer that had the code.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...