Focal Point
[CLOSED]Data Label color above reference line

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

July 12, 2018, 11:07 AM
DWaybright
[CLOSED]Data Label color above reference line
Is there a way to change the color of a data label on a bar chart when it is above the value of a reference line?

Thanks.

This message has been edited. Last edited by: DWaybright,


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
July 12, 2018, 05:12 PM
Waz
Possibly, what is the format of the chart ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 13, 2018, 09:02 AM
DWaybright
I'm using *GRAPH_SCRIPT to format it. This is part of a compound PDF I inherited.


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
July 13, 2018, 01:10 PM
Doug
How about using:
setFillColor(getDataText(),new Color(255,0,0));
in the "*GRAPH_SCRIPT" block?
July 13, 2018, 02:05 PM
Doug
Or, you could use the following, if you have multiple series:
setFillColor(getDataText(0), new Color(0,0,255));
setFillColor(getDataText(1), new Color(0,155,127));
setFillColor(getDataText(2), new Color(0,255,64));
setFillColor(getDataText(3), new Color(255,128,0));
setFillColor(getDataText(4), new Color(255,0,0));

July 13, 2018, 02:39 PM
DWaybright
@Doug - that changes all the values to red, not just the ones over the reference line.


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
July 13, 2018, 03:07 PM
Doug
You could use a stacked bar chart and calculate the vales, and colors, based on the value of the reference line. A bit complex, but doable.

Or, calculate / use the colors as used in my 14:05 based on the comparison to the value of the reference line.
July 13, 2018, 03:39 PM
DWaybright
@Doug,
Thanks. I was hoping for something relatively simple. Guess I should have known better. Razzer


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs
July 13, 2018, 04:14 PM
Doug
quote:
I was hoping for something relatively simple. Guess I should have known better.

Yeah, don't we all?
July 16, 2018, 09:09 AM
DWaybright
Big Grin


WebFOCUS 8.2.03 (production), 8.2.06 (testing)
AppStudio, InfoAssist
Windows, All Outputs