Page 1 of 1

### Color grid legend and Min and Max values of series

Posted: Wed Aug 01, 2018 5:15 am
Hi,

We are using Tee chart ColorGrid to draw series, we have 400 series with each series having 1000 points of array and we have added 30 color palette for legend. Legend is taking min and max values of 400 series and showing it with colors. How to change min and max values of series array so that the legend colors will become change. can anyone help on this to make solution.

Regards,
Sravan

### Re: Color grid legend and Min and Max values of series

Posted: Tue Aug 07, 2018 3:19 pm
Hello Sravan,

You're switching in the Series one by one?

To change the min or max of a series array you'll need to scan the array for the two values and replaced them at their index position. If there is more than one occurrence of the value you only need to modify one of them. I do get the feeling though, that perhaps I've missed the point of your question. Please explain further if that is the case.

With thanks.
Regards,
Marc Meumann

### Re: Color grid legend and Min and Max values of series

Posted: Wed Aug 08, 2018 7:17 am
Hi Marc,

Thanks for your reply. I'm attaching the screenshot here. Here we have 400 scans(series) in Color Grid. Based on series values legend values(Min and Max) are plotting. If I'm wrong correct me. If we have single series and if we change Min and Max values of axis then it will plot based on what we have changed. Like that can we change in color grid ? If we can how to do that? or do we need to change Array of series based on min and max values. Please give me some solution.

Regards,
SKumar

### Re: Color grid legend and Min and Max values of series

Posted: Wed Aug 08, 2018 2:39 pm
Hello SKumar,

Re.
Based on series values legend values(Min and Max) are plotting
Yes, the Legend min and max are ranged from the ColorGrid Series' min and max values.

Re.
if we change Min and Max values of axis
If you change Axis Min and Max (could use the Axis SetMinMax method for example) the Axis will range to those values but the values of the ColorGrid itself will remain unchanged; it'll remain at the Axis values that represent its x and y cell locations. That could result in a space at the end of the Axis, or cutting off some data if the Axis is shorter.

Re.
do we need to change Array of series based on min and max values
Yes, you'll need to do that if you wish to influence the Legend min and max. The Legend, whether you use a palette of few or many colours, will range between the Series min and max data values. The more colour values you apply to the grid palette, the more sensitivity you will see in representing the difference of data values in the grid.

eg.

Code: Select all

``````function draw() {
Chart1=new Tee.Chart("canvas");
grid = new Tee.ColorGrid();
grid.palette.colors = [ "#444411", "#551155", "#116666", "#771177", "#888811", "#119999"]; //6 colour legend
grid.data.values=[ [23,15,12, 8,39,50,34],
[19, 7,31,23,12,40,27],
[12,26,18,39,20, 6,11]
];