Hi Afshin,
I assume you are using the FinanceChart object.
To use custom x-axis labels, you would need to set the labels to the first chart that you add to the FinanceChart. (The FinanceChart may contain a main price chart as well as zero or more indicator charts.) For example, suppose the first chart you add to the FinanceChart is the main price chart. In Java, it is like:
//assuming this is the first chart you add to the FinanceChart
XYChart myMainChart = myFinanceChart.addMainChart(...........);
myMainChart.xAxis().setLabels(anArrayOfLabels);
In the above, anArrayOfLabels is a string array. The array size should be of the same as the timeStamps array. Each element of the array is the label for the trading session of the corresponding timeStamp. If no label is needed for a certain trading session, you may use an empty string as the label.
Hope this can help.
Regards
Peter |