.NET Framework Developer Center >
.NET Development Forums
>
Chart Controls for .NET Framework
>
Can't Display scrollbars
Can't Display scrollbars
- Hi
Am using the chart control bu i cant be able to get the scroll bar to appear on the chart.
I have looked at the sample project but am still not able to display the scroll bars
Please assist.
Regards
George.
Answers
- The samples are not always complete and have not always been updated to include every function/method name change.
Try this with your chart (I just figured out how to make this work):This example is AxisX only but Axis Y should be similar.1 ' Limit number of data points shown at one time 2 Chart1.ChartAreas(0).AxisX.ScaleView.Size = 15 3 ' Set scrollbar size 4 Chart1.ChartAreas(0).AxisX.ScrollBar.Size = 10 5 ' Show small scroll buttons only 6 Chart1.ChartAreas(0).AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.SmallScroll 7 ' Scrollbars position 8 Chart1.ChartAreas(0).AxisX.ScrollBar.IsPositionedInside = True 9 ' Change scrollbar colors 10 Chart1.ChartAreas(0).AxisX.ScrollBar.BackColor = Color.LightGray 11 Chart1.ChartAreas(0).AxisX.ScrollBar.ButtonColor = Color.Gray 12 Chart1.ChartAreas(0).AxisX.ScrollBar.LineColor = Color.Black - Proposed As Answer byAlex GorevMSFT, OwnerThursday, February 05, 2009 5:26 AM
- Marked As Answer byAlex GorevMSFT, OwnerThursday, February 05, 2009 3:53 PM
- Marked As Answer byAlex GorevMSFT, OwnerThursday, February 05, 2009 3:53 PM
All Replies
- The samples are not always complete and have not always been updated to include every function/method name change.
Try this with your chart (I just figured out how to make this work):This example is AxisX only but Axis Y should be similar.1 ' Limit number of data points shown at one time 2 Chart1.ChartAreas(0).AxisX.ScaleView.Size = 15 3 ' Set scrollbar size 4 Chart1.ChartAreas(0).AxisX.ScrollBar.Size = 10 5 ' Show small scroll buttons only 6 Chart1.ChartAreas(0).AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.SmallScroll 7 ' Scrollbars position 8 Chart1.ChartAreas(0).AxisX.ScrollBar.IsPositionedInside = True 9 ' Change scrollbar colors 10 Chart1.ChartAreas(0).AxisX.ScrollBar.BackColor = Color.LightGray 11 Chart1.ChartAreas(0).AxisX.ScrollBar.ButtonColor = Color.Gray 12 Chart1.ChartAreas(0).AxisX.ScrollBar.LineColor = Color.Black - Proposed As Answer byAlex GorevMSFT, OwnerThursday, February 05, 2009 5:26 AM
- Marked As Answer byAlex GorevMSFT, OwnerThursday, February 05, 2009 3:53 PM
- How to bring the scroll bar in a chart for a web page because Axis property "ScrollBar" is not available in MS Chart Web assembly?
- Marked As Answer byAlex GorevMSFT, OwnerThursday, February 05, 2009 3:53 PM
- Hi Alex,
what i am trying the functionality is to have a scroll bar for chart control not for chartArea,
scenario : i have multiple chartArea on chart control i want scrollbar to view all chartArea.
Hems - I go the result i wanted, if we set the chart control's size bigger then the container control [ panel ] , and by setting the
dock style of chart control to none, we can get a scroll bar.
Hems- Proposed As Answer byHemal Kotak Tuesday, November 03, 2009 7:37 AM


