Chart Colours

Started by David Reynolds, August 24, 2018, 11:52:24 AM

Previous topic - Next topic

David Reynolds

Given chart data
1/2/3/4/5/6/
How do I assign a different default colour set?
i.e. rather than the default of Light Red, Light Green, Light Blue, Light Yellow, Magenta, Cyan I would rather have Light Green, Cyan, Magenta, Light Blue, Light Yellow, Light Red
Perferably the built-in PxPlus Chart, but could switch to "fusionfree" or "google" if necessary (I see that they both have the 'Set_Clr$() method - but I don't know the call syntax)
Thanks

David Reynolds

Never mind...I found
%NOMADS'Chart_Colors$

Jane Raymond


FWIW, there are several ways to control the colors used in a chart. They can be set in the Chart Presets, or using the global variable %Nomads'Chart_Colors$, and via a template file in iNomads. Here's the url for the doc:  https://manual.pvxplus.com/PXPLUS/Charting%20Alternatives%20in%20PxPlus/Colors/Overview.htm
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

David Reynolds

In my PreDisplay logic I have:
%Nomad_Chart$="google"

Then I tried each of:
1. %Nomad_Chart_Colors$="Light Green/Light Cyan/Light Magenta/Light Blue/Light Yellow/Light Red/"
2. %Nomads'Chart_Colors$="Light Green/Light Cyan/Light Magenta/Light Blue/Light Yellow/Light Red/"
3. %INomads_Template$="MyChartTemplate" (where I created lib/_plus/inomads/templates/MyChartTemplate/chart_clrs.txt)

To no avail.
I also tried them all with %Nomad_Chart$="" (native) with no luck.

I ultimately had to put
MyChart.ctl'currentset=1,MyChart.ctl'TextColour$="Light Green"
MyChart.ctl'currentset=2,MyChart.ctl'TextColour$="Light Cyan"
etc, etc

Is there something I'm missing?

Jane Raymond

David,
Check if you have colors set in the Chart Presets, as they will take precedence over the colors in %nomads'chart_colors$.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

David Reynolds

No presets.

I have a working model now using 'CurrentSet and 'TextColour$
If you want to continue this off-list, that would be fine.
Or not. :)

Thanks