PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: David Reynolds on August 24, 2018, 11:52:24 AM
-
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
-
Never mind...I found
%NOMADS'Chart_Colors$
-
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 (https://manual.pvxplus.com/PXPLUS/Charting%20Alternatives%20in%20PxPlus/Colors/Overview.htm)
-
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?
-
David,
Check if you have colors set in the Chart Presets, as they will take precedence over the colors in %nomads'chart_colors$.
-
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