2
我的圖表有一個日期時間類型X軸和雙重類型Y軸。我正在嘗試使用下面的代碼來插入scalebreakstyle功能,但它不起作用。有沒有人有它的示例代碼。我正在嘗試web.UI代碼,但沒有工作。此外,我設置了2個系列的顏色,使它們保持不同。 /Scalebreakstyle不起作用圖表
/ Enable scale breaks.
chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.Enabled = true;
// Show scale break if more than 25% of the chart is empty space.
chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.CollapsibleSpaceThreshold = 25;
// Set the line width of the scale break.
chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.LineWidth = 2;
// Set the color of the scale break.
chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.LineColor = Color.Red;
// If all data points are significantly far from zero, the chart will calculate the scale minimum value.
chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.StartFromZero = StartFromZero.Auto;
// Set the spacing gap between the lines of the scale break (as a percentage of the Y-axis).
chart1.ChartAreas["ChartArea1"].AxisY.ScaleBreakStyle.Spacing = 2;
www.tinypic.com/r/6e2c83/5