Profile Picture

PredefinedChartStyle Horizontal and DataZoomTool problem

Posted By Ricardo Sousa 14 Years Ago

PredefinedChartStyle Horizontal and DataZoomTool problem

Author
Message
Ricardo Sousa
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 10, Visits: 1
Hello,

I'm trying to rotate a chart (HorizontalLeft or HorizontalRight) and use DataZoomTool, but it doesn't work.

The only way it makes zoom is if I set one of the ValueSnapper property (Vertical or Horizontal) in the NRangeSelection.

But I want to zoom both.

Any ideas?

To replicate, just use the Nevron.Examples.ChartGallery.Bar.HorizontalBar and add the zoom tool lines:

(chart as NCartesianChart).RangeSelections.Add(new NRangeSelection());
nChartControl1.Controller.Tools.Add(new NSelectorTool());
nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
nChartControl1.Controller.Tools.Add(new NDataZoomTool());


Thanks,
Ricardo

Nevron Support
Posted 14 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 Ricardo,

The range selection will by default zoom in when the distance from the begin point and the end point produces a positive offset on the x axis and negative offset on the y axis - that is when the range selection starts from [left, top] and goes [bottom, right] on a standard, non rotated cartesian chart.

This is why in the case of the rotated bar the zoom will be when you drag from the [right, top] to the [bottom, left] (in order to produce a negative) value on the y axis. Currently you can workaround this by using the AlwaysZoomIn property of the data zoom tool:

NDataZoomTool dzt = new NDataZoomTool();
dzt.AlwaysZoomIn = true;
nChartControl1.Controller.Tools.Add(dzt);

We've also added two properties to the range selection that allow you to modify the direction of the zoom.

NRangeSelection rangeSelection = new NRangeSelection();
rangeSelection.HorizontalAscendingZoom = true;
rangeSelection.VerticalAscendingZoom = true;

these two properties will be available in the next SP (probably at the end of this week).



Best Regards,
Nevron Support Team



Ricardo Sousa
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 10, Visits: 1
Thanks



Similar Topics


Reading This Topic