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

Message ListMessage List     Post MessagePost Message

  CandleStick Layer Intent/Margin/offset
Posted by Tobi on May-11-2014 06:22
Attachments:
Hello,

is it possible to add a margin/intent/offset for the candlestick layer? I want to combine a
candlestick layer with a stepline layer and I want to intent either the candlestick to the
middle between two x values (preferred solution), or be able to add an offset for the
setpline layer.

Please check the attached screenshot. The best would be to move the candlesticks in the
middle of the points. Any suggestions? - Thank you!

Best Regards
example.jpg

  Re: CandleStick Layer Intent/Margin/offset
Posted by Peter Kwan on May-13-2014 02:16
Hi Tobi,

Yes, you can shift the candlestick layer or step line layer or both by using setXData. For
example (in Java):

// shift the x-coordinates by 0.5 to the right
myCandleStickLayer.setXData(0.5, visibleCandleStickCount - 0.5);

Note that if you shift the candlestick layer, the candlestick layer and the step line layer will
no longer align. In particular, the rightmost candlestick will fall outside the step line layer.

Instead of shifting the layers, you may consider to configure the step line layer so that the
step midway between the data points (between the candlesticks). It is like:

myStepLineLayer.setAlignment(Chart.Center);

Hope this can help.

Regards
Peter Kwan

  Re: CandleStick Layer Intent/Margin/offset
Posted by Tobi on May-18-2014 07:33
Hi Peter,

thank you for your reply.

While the SetAlignment function for the StepLineLayer does not change anything within
PHP, we have now used SetXData for the CandleStickLayer to get the desired display.
However, surely the SetAlignment function would be nicer to fix this problem. Thank you for
your time and the solution for this problem!


Best Regards
  Tobi