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轴上显示日期和时间?谢谢!