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

Message ListMessage List     Post MessagePost Message

  FinanceChart, axis, and the number of candles
Posted by Joo Kang on Oct-16-2025 14:36
When the number of bars is large enough to fill the chart horizontally, the X-axis labels behave as expected. However, when there are only a few bars (for example, in recently listed stocks with short daily candle history), ChartDirector displays labels for every bar.

What I want is to show the label only for the first bar of each new month — formatted as mm or yy.mm. I tried implementing this using xAxis().setDateLabelFormat and xAxis()setMultiFormat, but setMultiFormat doesn’t seem to work as intended. I also have tried using financeChart.setDateLevelSpacing(0) to display every label for the chart then, try filtering with setMultiFormat

I would really appreciate some feedback. Thank you very much.

  Re: FinanceChart, axis, and the number of candles
Posted by Peter Kwan on Oct-17-2025 02:23
Attachments:
Hi Joo Kang,

The date/time labels comes from the timeStamp array. Even if you have one candlestick, you can still provide a timeStamp array with many dates. The array size for the timeStamp can be different from the high/low/open/close/vol arrays.

The timeStamp array is the same for all stocks. It is not related to any particular stock. You can obtain the timestamps array from any stock or from the stock exchange index (eg. KOSPI).

ChartDirector cannot automatically determine the timeStamp array because it is different for every stock exchange and it can be unpredictable. In a standard financial chart, the timeStamp array only includes trading days. It does not include public holidays, which is different for every country. It also does not include non-trading days due to weather (eg. hurricanes or typhoons) or other unpredictable factors. The only method to determine the timeStamps is from historical data, so the timeStamp array must be provided by your code.

Best Regards
Peter Kwan
finance_example.png