如何给chart 添加scrollbar

.Net技术 码拜 9年前 (2015-07-18) 1743次浏览 0个评论
 

添加了下面代码,为何依然看不 scrollbar?!

chart1.ChartAreas[0].AxisX.ScrollBar.Enabled = true;

反反复复地看 MSchartWinSamples,依然不能解决,快崩溃了

#1

chart外面套一个panel,设置panel的autoscroll=true。

#2

如何给chart 添加scrollbar

X轴刻度有数千,加了panel,还是这样的

20分

#3

chart1.ChartAreas[0].AxisX.ScrollBar.Enabled = true;
            chart1.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = true;
            chart1.ChartAreas[0].AxisX.ScaleView.Size = 20;//可视区域数据点数  

#4

楼主,你用的是highcharts吗

#5

// Set scrollbar size
chart1.ChartAreas[“Default”].AxisX.ScrollBar.Size = 10;

// Show small scroll buttons only
chart1.ChartAreas[“Default”].AxisX.ScrollBar.Buttons = ScrollBarButtonStyle.SmallScroll;

// Scrollbars position
chart1.ChartAreas[“Default”].AxisX.ScrollBar.IsPositionedInside = true;

// Change scrollbar colors
chart1.ChartAreas[“Default”].AxisX.ScrollBar.BackColor = Color.LightGray;
chart1.ChartAreas[“Default”].AxisX.ScrollBar.ButtonColor = Color.Gray;
chart1.ChartAreas[“Default”].AxisX.ScrollBar.LineColor = Color.Black;


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明如何给chart 添加scrollbar
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!