需要设置X轴的日期格式
代码示例如下
XYDiagram xy = chartControl1.Diagram as XYDiagram; if (xy != null) { xy.AxisX.DateTimeOptions.Format = DateTimeFormat.Custom; xy.AxisX.DateTimeOptions.FormatString = "MM-dd"; }
2022-05-20 21:18:10
需要设置X轴的日期格式
代码示例如下
XYDiagram xy = chartControl1.Diagram as XYDiagram; if (xy != null) { xy.AxisX.DateTimeOptions.Format = DateTimeFormat.Custom; xy.AxisX.DateTimeOptions.FormatString = "MM-dd"; }