Hi Craig,
If you referring to the FinanceChart object, this object has a method FinanceChart.setPercentageAxis that adds a percentage axis on the right side, and hide the original axis which displays price. It is because by default, the right y-axis is used for the price, and the left y-axis is used to display volume, so there is no good place to put the percentage axis except by hiding the price axis.
If you are not including volume bars in the main price chart, you can "unhide" the price axis and move the price axis to the left side. The code is like (in C#/Java):
FinanceChart f = new FinanecChart(.....);
// Add data as usual
f.setData(.....);
// Add the main price chart
XYChart mainChart = f.addMainChart(......);
// Add the percentage axis to the right side, which will also hide the price axis
f.setPercentageAxis();
// Unhide the price axis (which is the yAxis of the XYChart object)
mainChart.yAxis().setColors(Chart.LineColor, Chart.TextColor);
// Move the price axis to the left
mainChart.setYAxisOnRight(false);
//**** Make sure FinanceChart.addVolBars is not used. If you need to add volume bars,
//**** please add it as a separate indicator using FinanceChart.addVolIndicator.
Hope this can help.
Regards
Peter Kwan |