Nevron Forum

How to subscribe the event of view range changed

https://www.nevron.com/Forum/Topic8283.aspx

By Xiaolong Zhu - Friday, November 1, 2013

Hi Experts

We want to add a custom handler on the view range changed event caused by zoom in/out, is there any event we could subscribe? thanks.

xl
By Nevron Support - Friday, November 1, 2013

Hi Xiaolong,

You can attach to the Scale.RulerRangeChanged event:

chart.Axis(StandardAxis.PrimaryY).Scale.RulerRangeChanged += new EventHandler(Scale_RulerRangeChanged);

...

void Scale_RulerRangeChanged(object sender, EventArgs e)
{
// do something when axis range changes
}

By Xiaolong Zhu - Tuesday, November 5, 2013





Thank you. But i don't find the RulerRangeChanged event in the class of NLinearScaleConfigurator,did i miss sth? i am using Nevron2011.

xl
By Nevron Support - Tuesday, November 5, 2013

Hi Xialong,

The ruler object is part of the scale, not the scale configurator - take a look at the code snippet more closely...

By Xiaolong Zhu - Wednesday, November 6, 2013

Hi experts

i use Nevron2011.1 and i definitely not find the event RulerRangeChanged. pls see the attached pic. thanks.

xiaolong
By Nevron Support - Wednesday, November 6, 2013

Hi Xiaolong,

You're right - this event was added in the 2012 edition - you need to upgrade to this version in order to use this event.

By Xiaolong Zhu - Monday, November 18, 2013

Thanks for your reply.

Is there any workaronud in 2011 we could get notified if the view range changed? we need to do some re-sample work for the added series to improve the performance in the event handler.
By Nevron Support - Monday, November 18, 2013

Hi Xia,

Sorry - there is no equivalent event in 2011...