ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Auto scale individual line layer
Posted by gkkvishnu on Mar-29-2011 19:55
Hi Peter,

I have added multiple line layers to the XY chart. My requirement is to auto scale the individual line layer based on some selection using check box and keep the other line layers y axis linear scale min max values in tact. Is this possible to have a single data series layer auto scaled and all others use the set min and max values? And also i need to the get that auto scaled selected line layer min and max value which i will be showing in seperate text box.

I tried with chart.layout() but that is making all other line layers in the chart also getting auto scaled.

Thanks in Advance.

  Re: Auto scale individual line layer
Posted by Peter Kwan on Mar-30-2011 02:49
Hi gkkvishnu,

Do you mean you want to auto-scale the y-axis based on the data of some layers and not the other layers?

If you are using ChartDirector Ver 5.x, you may use something like:

.... add the layers that are to be considered in auto-scaling

c.layoutAxes()

.... add the layers that are not to be considered in auto-scaling


Note that some of the layers may "overflow" the plot area, as the axis scale may not include the data range of all the layers. If you want to clip the layer to the plot area, please use XYChart.setClipping.

Also, with the above method, the layers must be added in a certain order. The layers will also be displayed from front to back in the same order. If you would like the display order to be different from the order that the layers are added, you may use Layer.moveFront and/or Layer.moveBack to control the ordering of the layers.

Hope this can help.

Regards
Peter Kwan