01-09-2014 10:42 AM
I have an intensity graph on which the y axis represents discrete channels. I want to be able to zoom the chart so that there are an integer number of channels displayed. The default behaviour seems to be that when you xoom, it is possible to see half channels on the plot. What I'd love to have is a situation where if the zoomed range on the Y axis was showing for example channel 22.7 to channel 28.1, that the plot would resize the Y axis to the range 23 to 28. I'd also want to be sure that a minimum of one channel were displayed. I see no obvious easy way of doing it, but I'd love to be wrong........
Thanks for any help,
Joe
Solved! Go to Solution.
01-09-2014 11:19 AM - edited 01-09-2014 11:20 AM
You mention intensity graph and chart interchangeably. Since they are quite different, could you clarify what you actually have?
Personally, I would use integer numeric controls to set the xmin and xmax. You can do math and range checking as needed.
Alternatively, there is also a "Scale range change" event, that you could use to edit the ranges after the user has zoomed.
01-09-2014 01:15 PM
Sorry, I should have been clearer. It is an intensity graph.
I'll take a look at what you suggest.
Thanks,
joe
01-09-2014 02:04 PM - edited 01-09-2014 02:05 PM
The 'Scale range change' event did the trick. In the case for that event you read the Y scale max, round towards +infinity & write it back. Then with the Y scale min, round towards -infinity & write that back. Thanks for the hint!
Joe