時,當我通過我的axisX圖表正在轉移滾動移動。我認爲這是因爲我使用自定義標籤。如何修復axisX寬度?圖表寬度滾動
chart1.ChartAreas[0].AxisX.IsMarksNextToAxis = false;
chart1.ChartAreas[0].CursorX.IsUserEnabled = true;
chart1.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
chart1.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
chart1.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = false;
chart1.ChartAreas[0].AxisX.ScaleView.Zoom(1, 250);
chart1.ChartAreas[0].AxisX.LabelAutoFitStyle = LabelAutoFitStyles.None;
chart1.ChartAreas[0].AxisX.IsLabelAutoFit = true;
chart1.ChartAreas[0].AxisY.LabelAutoFitStyle = LabelAutoFitStyles.None;
chart1.ChartAreas[0].AxisY.IsLabelAutoFit = false;
//custom labels
//...
//...
if (i % 13 == 0)
{
CustomLabel CL = new CustomLabel();
CL.FromPosition = i - 13;
CL.ToPosition = i + 13;
CL.Text = L[i].Item1.ToString("d MMM\r\nHH:mm");//+"\n"+L[i].Item1.ToString("HH:mm");
chart1.ChartAreas[0].AxisX.CustomLabels.Add(CL);
}
//...
//..