Profile Picture

CartesianChart ScrollBar

Posted By Elvira Aminova 13 Years Ago
Author
Message
Elvira Aminova
questionmark Posted 13 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: 10 Years Ago
Posts: 10, Visits: 1
Is it possible to change the style of the scrollBar that is shown when cartesianChart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible assigned to true?

I want to change the resetButton color, scrollButons color, background color...

Nevron Support
Posted 13 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 Elvira,

Yes you can do that using the HoverFillStyle, PressedFillStyle, UnPressedFillStyle etc. properties exposed for each scrollbar button. The following code snippet shows how to change the appearance of the thumb:

   NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];

   chart.RangeSelections.Add(new NRangeSelection());

   chart.Axis(StandardAxis.PrimaryX).ScrollBar.Visible = true;
   NScrollBarButton scrollThumb = chart.Axis(StandardAxis.PrimaryX).ScrollBar.ThumbButton;
   scrollThumb.HoverFillStyle = new NColorFillStyle(Color.Orange);
   scrollThumb.PressedFillStyle = new NColorFillStyle(Color.Red);
   scrollThumb.UnPressedFillStyle = new NColorFillStyle(Color.Green);

   NBarSeries bar = new NBarSeries();
   bar.Values.Add(10);
   bar.Values.Add(20);
   bar.Values.Add(30);

   chart.Series.Add(bar);

   nChartControl1.Controller.Tools.Add(new NSelectorTool());
   nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
   nChartControl1.Controller.Tools.Add(new NDataZoomTool());

The other possible buttons you can touch are:

chart.Axis(StandardAxis.PrimaryX).ScrollBar.ResetButton:

chart.Axis(StandardAxis.PrimaryX).ScrollBar.LeftScrollButton;

chart.Axis(StandardAxis.PrimaryX).ScrollBar.RightScrollButton;

chart.Axis(StandardAxis.PrimaryX).ScrollBar.LeftSliderButton;

chart.Axis(StandardAxis.PrimaryX).ScrollBar.RightSliderButton;

chart.Axis(StandardAxis.PrimaryX).ScrollBar.LeftScrollButton;

chart.Axis(StandardAxis.PrimaryX).ScrollBar.RightScrollButton;

Hope this helps - let us know if you meet any problems.

 



Best Regards,
Nevron Support Team



Elvira Aminova
Posted 13 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: 10 Years Ago
Posts: 10, Visits: 1
Thanks for help!



Similar Topics


Reading This Topic