Profile Picture

scroll bar with animated zoom

Posted By Daniel Csimszi 11 Years Ago
Author
Message
Daniel Csimszi
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 61, Visits: 35
Thank you, works perfectly

Nevron Support
Posted 11 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 Daniel,

You add the data zoom tool before the axis scroll tool, which prevents this tool from being activated. The correct order is:

nChartControl1.Controller.Selection.Add(chart);
nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
nChartControl1.Controller.Tools.Add(m_DataZoomTool);

Also there is no need to add the data zoom tool twice.

Best Regards,
Nevron Support Team



Daniel Csimszi
Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 61, Visits: 35
Hi,

This is my constructor, where I set up the scroll and zoom as well:

NDataZoomTool m_DataZoomTool = new NDataZoomTool();

this.nChartControl1 = nChartControl1;

#region chart set up

// configure the chart
m_Chart = (NCartesianChart)nChartControl1.Charts[0];

// add interlaced stripe to the Y axis
NScaleStripStyle stripStyle = new NScaleStripStyle(new NColorFillStyle(Color.Beige), null, true, 0, 0, 1, 1);
stripStyle.ShowAtWalls = new ChartWallType[] { ChartWallType.Back };
((NStandardScaleConfigurator)m_Chart.Axis(StandardAxis.PrimaryY).ScaleConfigurator).StripStyles.Add(stripStyle);
m_Chart.Location = new NPointL(new NLength(0, NRelativeUnit.ParentPercentage), new NLength(5, NRelativeUnit.ParentPercentage));
m_Chart.Size = new NSizeL(new NLength(100, NRelativeUnit.ParentPercentage), new NLength(95, NRelativeUnit.ParentPercentage));


NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
NRangeSelection rangeSelection = new NRangeSelection();
rangeSelection.ZoomOutResetsAxis = true;
chart.RangeSelections.Add(rangeSelection);
chart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = true;
chart.Axis(StandardAxis.PrimaryY).ScrollBar.Visible = true;

//set up axis X
NAxis axiss = m_Chart.Axis(StandardAxis.PrimaryX);
NDateTimeScaleConfigurator dateTimeScale = new NDateTimeScaleConfigurator();
dateTimeScale.MajorGridStyle.LineStyle.Pattern = LinePattern.Dot;
dateTimeScale.MajorGridStyle.SetShowAtWall(ChartWallType.Back, true);
dateTimeScale.MajorGridStyle.SetShowAtWall(ChartWallType.Floor, false);
dateTimeScale.InnerMajorTickStyle.Length = new NLength(0);
dateTimeScale.MaxTickCount = 5;
dateTimeScale.MajorTickMode = MajorTickMode.AutoMaxCount;
dateTimeScale.AutoDateTimeUnits = new NDateTimeUnit[] { NDateTimeUnit.Second };
dateTimeScale.RoundToTickMin = false;
dateTimeScale.RoundToTickMax = false;
dateTimeScale.EnableUnitSensitiveFormatting = false;
dateTimeScale.LabelValueFormatter = new NDateTimeValueFormatter("dd-MMM-yy \r\n hh:mm:ss");
//DateTimeValueFormat.Year2Digit, DateTimeValueFormat.Year2Digit
dateTimeScale.LabelStyle.TextStyle = new NTextStyle(new Font("Verdana", 8), Color.Black);
axiss.ScaleConfigurator = dateTimeScale;

nChartControl1.Settings.AnimationInterval = 50;
m_DataZoomTool.AnimateZooming = true;
m_DataZoomTool.AnimationSteps = 10;

nChartControl1.Controller.Tools.Add(m_DataZoomTool);


nChartControl1.Controller.Selection.Add(chart);
nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
nChartControl1.Controller.Tools.Add(new NDataZoomTool());

#endregion

Nevron Support
Posted 11 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 Daniel,

Can you post the code you used to configure the control?

Best Regards,
Nevron Support Team



Daniel Csimszi
questionmark Posted 11 Years Ago
View Quick Profile
Forum Guru

Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 61, Visits: 35
Hi,

I tried to include your data zoom tool (C# Examples/All Examples/Interactivity/Tools/Data Zoom Tool) in my project, how ever I noticed that the scroll bar does not work on it. Are there any extra code which is need to be added?

Regards
Daniel



Similar Topics


Reading This Topic