Profile Picture

How to get updated Zoom PagingView Range on Reset event???

Posted By Niranjan Singh 12 Years Ago

How to get updated Zoom PagingView Range on Reset event???

Author
Message
Niranjan Singh
questionmark Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
I have subscribed to the ScrollBar_Reset event and it does return the new ViewRange. View Range update after the reset button event.


// Reset Event


void ScrollBar_Reset(object sender, EventArgs e)
{
NRange1DD xAxisRange = new NRange1DD(chartPrimaryXAxis.ScrollBar.BeginValue, chartPrimaryXAxis.ScrollBar.EndValue);
//NRange1DD xAxisRange = chart.Axis(StandardAxis.PrimaryX).Scale.RulerRange;
DateTime startdate = DateTime.FromOADate(xAxisRange.Begin);
DateTime enddate = DateTime.FromOADate(xAxisRange.End);
NScrollBar scrollbar = (sender as NScrollBar);
System.Diagnostics.Debug.WriteLine("ScrollBar EndValueChanged: StartDate" +
DateTime.FromOADate(scrollbar.BeginValue) + "- End Date:" + DateTime.FromOADate(scrollbar.EndValue));

System.Diagnostics.Debug.WriteLine("Horizontal Axis Begin Value" + startdate.ToString());
System.Diagnostics.Debug.WriteLine("Horizontal Axis End Value" + enddate.ToString());
}


Does anyone know that how to track the paging view range change on reset button click?

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Niranjan,

You can try to recalculate the control:

nChartControl1.Document.Calculate();
nChartControl1.RecalcLayout();

and then get the new range.



Best Regards,
Nevron Support Team



Niranjan Singh
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
I have modified code as you suggested but it is returning last zoomIn Range rather than reset range.

void ScrollBar_Reset(object sender, EventArgs e)
{
chartControl.Document.Calculate();
chartControl.RecalcLayout();
//chartControl.Document.RecalcLayout(chartControl.View.Context);

////dateTimeScale
//NRange1DD xAxisRange = chart.Axis(StandardAxis.PrimaryX).Scale.RulerRange;
//DateTime startdate = DateTime.FromOADate(xAxisRange.Begin);
//DateTime enddate = DateTime.FromOADate(xAxisRange.End);
//NScrollBar scrollbar = (sender as NScrollBar);
//DateTime startdate = DateTime.FromOADate(scrollbar.BeginValue);
//DateTime enddate = DateTime.FromOADate(scrollbar.EndValue);
DateTime startdate = DateTime.FromOADate(chartPrimaryXAxis.PagingView.ViewRange.Begin);
DateTime enddate = DateTime.FromOADate(chartPrimaryXAxis.PagingView.ViewRange.End);
System.Diagnostics.Debug.WriteLine("On ScrollBar Reset StartDate:" + startdate.ToString() + " - EndDate:" + enddate.ToString());
//UpdateResultsViewReloadState();
}


But it result same as before.

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Niranjan,

The reset button will simply disable the paging view - however obviosly this is done after the event is fired - to simulate that just use:

someAxis.PagingView.Enabled = false;

before you calculate the control. Hope this helps...



Best Regards,
Nevron Support Team



Niranjan Singh
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 4 Years Ago
Posts: 49, Visits: 179
If i do as you say, then it does not "ZoomIn" again and calculate view range value is returned as ResetMode = View.

primaryXAxis.PagingView.Enabled = false;


Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Niranjan,

Please submit a support ticket for further investigation of this request.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic