我在创建散点图(ScatterSmoothedLine)时,需要显示x轴(PrimaryCategoryAxis)的“主要网格线”(MajorGridLines)以及“次要网格线”(MinorGridLines),
但设置chart.PrimaryCategoryAxis.HasMinorGridLines = true也无法显示次要网格线(主要网格线显示正常),请问如何解决?谢谢。
chart.PrimaryValueAxis.HasMinorGridLines = true;
chart.PrimaryValueAxis.MajorGridLines.LineProperties.Color = Color.Red;
chart.PrimaryValueAxis.MinorGridLines.LineProperties.Pattern = ChartLinePatternType.Solid;
chart.PrimaryValueAxis.MinorGridLines.LineProperties.Transparency = 0.1f;
rachel.lei wrote:您好,
感谢您的咨询。
请参考下面的代码设置次要网格线。如果这不是您想要的,请提供一个您期望的结果文档给我们参考。谢谢!
- Code: Select all
chart.PrimaryValueAxis.HasMinorGridLines = true;
chart.PrimaryValueAxis.MajorGridLines.LineProperties.Color = Color.Red;
chart.PrimaryValueAxis.MinorGridLines.LineProperties.Pattern = ChartLinePatternType.Solid;
chart.PrimaryValueAxis.MinorGridLines.LineProperties.Transparency = 0.1f;
Sincerely,
Rachel
E-iceblue support team