Hi there,
I am trying to plot a chart, which has dual range axis(y-axis). The x-axis units are immaterial in this case. Suppose my left Y-Axis has ticks 1,2,3,4,5 then I want my right y-axis to have tick units 2,4,6,8,10; where the tick unit 1 on the left axis corresponds to the tick unit 2 on the right axis i.e., 1 of left axis = 2 of right axis. I know how to create another axis by using the NumberAxis class and add it to the chart, but the left and right y-axis ticks do not correspond the way they are supposed to i.e. tick 1 on left axis comes in a straight line/corresponds with tick unit 2 of the right axis. Is there a method which can help me to get these units converted and have both the axes aligned properly? Any help shall be highly appreciated.
Thanks,
Sachin
HELP needed with Tick Units Conversion
Re: HELP needed with Tick Units Conversion
Sachin,
I accomplish essentially the same thing you are asking about by explicitly setting the margin and bounds of both Y axes, using setLowerMargin(), setUpperMargin(), and setRangeWithMargins() on both. In my case my left axis is a value and the right is a percent. I do not bind any datasets to the second axis... You don't specify if you are doing so or not, it may or may not matter.
-Jonathan
I accomplish essentially the same thing you are asking about by explicitly setting the margin and bounds of both Y axes, using setLowerMargin(), setUpperMargin(), and setRangeWithMargins() on both. In my case my left axis is a value and the right is a percent. I do not bind any datasets to the second axis... You don't specify if you are doing so or not, it may or may not matter.
-Jonathan
Re: HELP needed with Tick Units Conversion
Thanks Jonathan. Even I tried the same way, but was hoping if there was a better way to do it.