Hi Tarek,
Basically, you can use Axis.addMark to add vertical a mark line at anywhere along the x-axis.
The following assumes you are using the FinanceChart, and you would like to add the lines in the main price chart (returned when you call addMainChart).
for (int i = extraPoints + 1; i < timeStamps.Length; ++i)
if (timeStamps[i].Day != timeStamps[i - 1].Day)
myMainPriceChart.xAxis().addMark(i - extraPoints, 0xff0000);
(Note: the "extraPoints" above is the extraPoints parameter you pass to FinanceChart.setData. It may equal to 0 or some other values. The myMainPriceChart is the XYChart object returned from FinanceChart.addMainChart.)
If you want separator lines in the main price chart as well as indicator charts, you would need to use the same code for each indicator chart. So you may consider to create a function that contains the above code, and call it for the main price chart and the indicator charts.
Hope this can help.
Regards
Peter Kwan |