日期:2014-05-17  浏览次数:20811 次

vs2010 chart控件


为何x轴没有完全显示出来 本来有1月到12月的

------解决方案--------------------
chart1.ChartAreas[0].AxisX.Interval = 1;
------解决方案--------------------
ref http://stackoverflow.com/questions/7208383/mschart-custom-xaxis-labeling
------解决方案--------------------
             折点处显示红点。
           MarkerStyle marker = MarkerStyle.Circle;//标记类型
                foreach (Series ser in chart.Series)
                {
                    ser.ChartType = SeriesChartType.Line;
                    ser.YValueType = ChartValueType.Time;
                    ser.MarkerSize = 6;
                    ser.MarkerStyle = marker;
                    ser.MarkerBorderColor = Color.FromArgb(64, 64, 64);//颜色
                }
------解决方案--------------------
默认 x 是分 6 份的,你要设置。