I am having some trouble getting a scale break to display on my chart.
I only want to have 10 labels on the Y axis so in the BeforeLayout event I do the following
The range is displays correctly. But when I turn ScaleBreaks.Enabled = true nothing displays on the Y axis. The range does not appear and neither does the ScaleBreak.
Seems like it should be fairly straight forward... anyone have any ideas on why this does not work.
Thanks!
I only want to have 10 labels on the Y axis so in the BeforeLayout event I do the following
double max = Math.Floor(chart.PlotArea.YAxis.MaxValue); |
double step = Math.Round( max / 10); |
chart.PlotArea.YAxis.Clear(); |
chart.PlotArea.YAxis.AutoScale = false; |
chart.PlotArea.YAxis.AddRange(0, max, step); |
AxisSegment seg = new AxisSegment(); |
seg.Name = "asdfasdfasdf"; |
seg.MaxValue = 3000; |
seg.MinValue = 100; |
seg.Step = 1000; |
chart.PlotArea.YAxis.ScaleBreaks.Segments.Add(seg); |
chart.PlotArea.YAxis.ScaleBreaks.MaxCount = 1; |
chart.PlotArea.YAxis.ScaleBreaks.Enabled = true; |
The range is displays correctly. But when I turn ScaleBreaks.Enabled = true nothing displays on the Y axis. The range does not appear and neither does the ScaleBreak.
Seems like it should be fairly straight forward... anyone have any ideas on why this does not work.
Thanks!