大家好我有一个MSChart,我在图表上有一些箭头确切地说系列重叠的地方我想知道它们至少是什么,也许我怎么能把它们拿出来。
使用两种方法生成图表:
private void DesignChart()
{
// Create Chart Area
ChartArea chartArea1 = new ChartArea();
// Add Chart Area to the Chart
chart1.ChartAreas.Add(chartArea1);
chart1.Legends.Add(new Legend());
// chart1.ChartAreas[0].AxisX.LabelStyle.Format={"00:00:00"};
chart1.Location = new Point(14, 494);
chart1.Size = new Size(982, 224);
this.Controls.Add(chart1);
((System.ComponentModel.ISupportInitialize)(chart1)).EndInit();
}
private void SetGraph(){
.........
for (int i = 0; i < chart1.Series.Count; i++)
{
chart1.Series[i].XValueMember = "Date";
chart1.Series[i].YValueMembers = "Value";
chart1.Series[i].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
chart1.Series[i].XValueType = ChartValueType.Time;
chart1.Series[i].ChartType = SeriesChartType.Line;
chart1.Series[i].MarkerStyle = MarkerStyle.Star10;
chart1.Series[i].MarkerSize = 8;
chart1.Series[i].MarkerColor = chart1.Series[0].BorderColor;
chart1.Series[i].BorderWidth = 3;
chart1.Series[i].IsValueShownAsLabel = true;
chart1.Series[i].ToolTip = "#VALY => #AXISLABEL";
}
chart1.ChartAreas[0].AxisX.IsMarginVisible = true;
}
由于
答案 0 :(得分:1)
我认为这是因为这一行:
chart1.Series[i].IsValueShownAsLabel = true;
如果数据点靠近/重叠,图表控件使用箭头指向参考点,这样您就不会感到困惑 - 或类似的东西。尝试将此行设置为false并查看箭头是否消失。不确定是否有任何其他方法可以覆盖箭头显示。
答案 1 :(得分:0)
'箭头'是否有可能是这条线的结果?
chart1.Series[i].MarkerStyle = MarkerStyle.Star10;