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

Message ListMessage List     Post MessagePost Message

  gap between last HLOC bar and y axis
Posted by Jeff on Jan-25-2019 03:27
How do you add a gap between the last bar of a HLOC chart and the y axis in terms of pixels? I need 100 pixels of space for some labels.

Thanks,

Jeff

  Re: gap between last HLOC bar and y axis
Posted by Peter Kwan on Jan-25-2019 22:29
Hi Jeff,

If you want an empty gap, you can use Axis.setMargin. If you are using an XYChart with addHLOCLayer, please use:

c.xAxis().setMargin(100);

If you are using a FinanceChart, please apply Axis.setMargin to the first chart added into the FinanceChart. For example, if the first chart is the main price chart, then the code is like:

// Assume the main price chart is the first chart added to the FinanceChart
XYChart c = myFinanceChart.addMainChart(....);
c.xAxis().setMargin(100);

Hope this can help.

Regards
Peter Kwan