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

Message ListMessage List     Post MessagePost Message

  Scatter plot on X and Y axis
Posted by Ramya on Dec-24-2010 20:18
I have a sctter chart. And I have data points on top of the X or the Y axis itself (eg.(0,10),(20,0)).
I want to know how to bring the scatters on top of the Axis ? Now the Axis is dispalying on top of the scatters.  I tried setZOrder method.But it seems  this method is applicable only to TextBox objects. Please help.

  Re: Scatter plot on X and Y axis
Posted by Peter Kwan on Dec-27-2010 23:45
Hi Ramya,

Currently, in ChartDirector, the axis is always on top of all layers. The key rationale is that we try to avoid the layers blocking the axis labels.

Now the axis has 4 main parts - the axis title, the axis labels, the axis ticks, and the axis stem. For your case, the point (0, 10) can be at an axis label position. Do you want to internationally block the axis label so that people cannot see the label? Or do you want to block the axis ticks or block the axis stem?

If you want to block the axis labels, you can disable the labels entirely. Similarly, if you want to block the ticks or the axis stem, you can disable them. You may use Axis.setColors to set different parts of the axis to transparent, thereby disabling them.

If you disable the axis stem, you can use BaseChart.addLine to add a line behind the layers to act as the axis stem. For example, if you want the symbol to stay in front of the x-axis stem (but behind the x-axis labels and the associated ticks so that people can see them), you may set the x-axis stem to transparent, then add a horizontal line under the layer as the x-axis. The Line object (the returned value from BaseChart.addLine) does support setZOrder, so you can put it behind the layers.

Hope this can help.

Regards
Peter Kwan