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

Message ListMessage List     Post MessagePost Message

  send the yAxis2 labels to the back.
Posted by Cj Talas on Nov-11-2011 19:17
Attachments:
Hi Peter,


Thanks for the support. I have one quick question.

I need to send the yAxis2 labels (scale legend) at the back to give more emphasis on the candles rather than the (volume bar) labels, i tried the function Layer.moveBack but on what im doing it seems like it has no effect...

Below is the screenshot and the code i use to create the candles and the volume.
(i guess for now its okay that the yAxis2 labels are on top of the volume bars)

//draw the candlestick - non colored version
mainChart.addCandleStick(a[0].colorCode, a[1].colorCode, chart.drawHolidays);
mainChart.setXIndent(true);


//draw the volume
mainChart.addVolBars((int)(chart.getMainHeight * .40), a[0].colorCode, a[1].colorCode, a[2].colorCode, a[3].colorCode, a[4].colorCode, a[5].colorCode);

I hope you can point me to right direction.

(i tried creating layers but i guess the labels are always on top)


Thanks in advance.
Cj
q4.png

  Re: send the yAxis2 labels to the back.
Posted by Peter Kwan on Nov-12-2011 02:12
Hi Cj Talas,

Unluckily, the y-axis labels are always on top of the layers. The moveFront and moveBack can only be used to move the layers relative to one another and relative to the grid lines. The axis labels are drawn only after all ther layers are drawn, and so the labels always stay on top of the layers.

Regards
Peter Kwan

  Re: send the yAxis2 labels to the back.
Posted by Cj Talas on Nov-16-2011 10:48
Attachments:
Hi Peter,

Sorry for the delayed response.
I understand. However I have a different question though

In the attached image you can notice that unfortunately the price label (or the candlestick) happens to be on the same axis as the legend (title).

This time is it also possible to make the price label (candlestick label) go on top of the
Legend. (what i want to achieve here is to make the price label more visible) rather than
the legend that indicates the 13-week MA

Thank you in advance.
Cj
q5.png

  Re: send the yAxis2 labels to the back.
Posted by Peter Kwan on Nov-17-2011 03:29
Hi Cj Talas,

Unluckily, the legend box is always on top of all layers, so it will be in front of the data labels.

For your case, I suggest you may use Axis.setMargin to reserve some space on the top for the legend box. This can avoid the layers from overlapping the legend box. In the original financial chart examples that come with ChartDirector, there is always a y-axis margin at the top, and the legend box is always at the top of the plot area which does not have y-axis scale.

Regards
Peter Kwan

  Re: send the yAxis2 labels to the back.
Posted by Cj Talas on Nov-19-2011 12:00
I see,

Appreciate the support.

Regards