Profile Picture

Zooming in multiple chart controls

Posted By Dieter Spiegel 14 Years Ago
Author
Message
Dieter Spiegel
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 9, Visits: 1
Thanks Bob. That worked.

Regards

Dieter


bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi Dieter,

It may be that when you apply to zoom range the charts that are not visible are not calculated yet - try adding the following code at the end of the FillChartWithRandomData function - this will ensure the chart ranges are calculated and the zoom in range does not get truncated:

private void FillChartWithRandomData(NChartControl nCC)
{

nCC.Document.Calculate();
nCC.Document.RecalcLayout(nCC.View.Context);
}

Let me know if the problem persists...

Best regards,
Bob



Dieter Spiegel
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 9, Visits: 1
Did anybody have a chance to look at this issue?

Thanks

Dieter


Dieter Spiegel
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 9, Visits: 1

Bob, I still have an issue with the synchronized zooming and updating the other charts, and I am not sure if it's on my side or if it's a bug in the software.  I attached a sample project.  I have 5 chart controls in a form with scrollbars.  When the first chart is zoomed all other charts are updated.

The problem is that the chart that is outside the view is not updated, unless it was scrolled into view at least once.

To reproduce the problem:

1. after launching the program zoom in the first chart

2. scroll to the last chart - the charts that are not in the view are not updated

 

And this way it works:

1. after launching the program scroll to the last chart

2. then scroll to the top

3. zoom in the first chart - all charts are updated correctly

Any idea what I am doing wrong?

 

Thanks

Dieter

 



Attachments
nevroncharttest.zip (53 views, 89.00 KB)
Dieter Spiegel
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 9, Visits: 1
Thanks Bob. That works great.

Dieter


bob milanov
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)Supreme Being (152 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 153, Visits: 11

Hi Dieter,

You can intercept the data zoom tool end drag event:

dataZoomTool.EndDrag += new EventHandler(OnDataZoomTool_EndDrag);
void OnDataZoomTool_EndDrag(object sender, EventArgs e)
{
  // do synchronization here
}

Alternatively you can have master slave axes as shown in the following example:

Interactivity\Tools\Axis Scroll tool.

That way the control will automatically synchronize the range of charts.

Let me know if you meet any problems.

Best regards,
Bob


 



Dieter Spiegel
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 9, Visits: 1
Hi, I have 8 charts in 8 separate chart controls. When the user zooms in the first chart (data zoom tool) I want to update the view ranges of all the other charts. I am not sure which event I need to catch that tells me that the zoom operation is done and the first chart is updated. Right now I am catching the mouse up event and use a timer to update the other charts. This works, but it doesn't seem to be the right way to do this.

I'd appreciate any help.

Thanks

Dieter




Similar Topics


Reading This Topic