1
我有在它的圖表一個WinForm,在我的代碼我已經設置:C#WinForm的圖表,縮放和x軸的刻度顯示日期和時間
//Enable range selection and zooming end user interface
this.chart1.ChartAreas["ChartArea1"].CursorX.IsUserEnabled = true;
this.chart1.ChartAreas["ChartArea1"].CursorY.IsUserEnabled = true;
this.chart1.ChartAreas["ChartArea1"].CursorX.IsUserSelectionEnabled = true;
this.chart1.ChartAreas["ChartArea1"].CursorY.IsUserSelectionEnabled = true;
this.chart1.ChartAreas["ChartArea1"].AxisX.ScaleView.Zoomable = true;
this.chart1.ChartAreas["ChartArea1"].AxisY.ScaleView.Zoomable = true;
this.chart1.ChartAreas["ChartArea1"].AxisX.ScrollBar.IsPositionedInside = true;
this.chart1.ChartAreas["ChartArea1"].AxisY.ScrollBar.IsPositionedInside = true;
它放大後的選擇。但是,我的選擇僅限於網格線。而且,在選擇時,會出現紅叉,十字只會停留在固定的x軸值。我如何修改這樣的選擇不限於網格線/特定的固定x軸值?
我還設置x軸類型日期時間,即
this.chart1.Series[chanName].XValueType = ChartValueType.DateTime;
然而,x軸僅顯示日期,而不是時間。我如何在x軸上顯示日期和時間?謝謝!