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 |