Graph Colors

So I see in theme editor there is a “GRAPH COLORS” under Graphs…

It is a comma separated list of hex color values… is this the only place that defines colors to be used in charts? In charts it seems haphazard how it picks what color for what criteria/value…

How does this determine what color gets associated to a particular field?

And how can I indicate I want a specific color value for a specific criteria/value in the chart?

thanks,

David

Re: Graph Colors

More information:

In the source… I see it has brought my colors into an array:

$cores = array(’#FF0000’,’#F9D804’,’#0007C4’,’#00B200’);

that is: red, yellow, blue, green

then function for like a pie chart is called to set the slice colors:

SetSliceColors($cores)

That class/function probably isn’t viewable or is it? I need to see inside there to see why or how it grabs in what order from the array…

Because how it applies those is not in the order based in the array or even based on criteria/values in some ascending or descending manner that might make sense…

My number values coming back that are the data for the chart are: 5, 4, 3, 1

But, it draws the key and uses the colors in the following order:

blue, red, green, yellow

Which means the data isn’t sorted and is random because that means data is coming back: 4 1 5 3

Re: Graph Colors

While SC5 does include AnyCharts, their IDE support of these charts are very limited compared to what is available. I ended up creating my own PHP functions that create the raw XML files used to generate the charts. This way you have FULL control over the charts.

I have XML functions for Line,Pie,Scatter chart types.

You will need 3 functions: (name them what you want)
myPrefix - sets all the XML properties for chart
myData - create the DATA XML for the chart
mySuffix - Displays the report with generated XML

Spend the time to spit out your own XML!

See:
http://www.anychart.com/products/anychart/docs/users-guide/index.html
http://www.anychart.com/products/anychart/docs/xmlReference/index.html

Regards,
Scott.

Re: Graph Colors

Very cool! Thanks again Scott! That seems totally feasible and easily do’able, just takes some time like you said. I will get to that in my next sprint to take the charts further. The way they are integrated into the IDE is pretty awesome though to get charts working like this out of the box… continously impressed.

I would be stuck though if you didn’t answer all my questions :wink:

thanks -

David

Re: Graph Colors

Any idea why a SUM would be then showing $ as the suffix on the chart pie slices? Do sums in their implementation assume the values are monetary? None of my original data fields/columns are currency etc.

And of course I can’t find a straightforward way to not have a suffix description or change that to at least some other suffix other than a $…

ugh :frowning:

Please can some help me here.
I need to change the color of a “Grid Line Chart” (see bottom of http://scriptcase.my-911.com:98/scriptcase/doc/manual_mp/manual_mp.htm?item=10-Aplicacoes_de_Consulta/02-Consulta/14-Campos/06-Numero.htm), based upon whether the field being bar charted (called: ‘measurement’) is greater than or smaller than a second field called “threshold”

If “measurement” greater than or equal to “threshold” the bar graph should be Red
If “measurement” less than “threshold” the bar graph should be Green

Please can someone help me here