0

I am using msCharts.

I have plotted a line with x axis points between 38000 and 42000.

I am trying to add a StripLIne. I get no error but cannot see it:

        StripLine stripLine = new StripLine();
        stripLine.Text = "Strip";
        stripLine.Interval = 0;
        stripLine.IntervalOffset = 41000;
        stripLine.StripWidth = 500;
        stripLine.BackColor = Color.Red;

        chart.ChartAreas[0].AxisX.StripLines.Add(stripLine);

What is wrong?

TaW
  • 53,122
  • 8
  • 69
  • 111
ManInMoon
  • 6,795
  • 15
  • 70
  • 133
  • Assuming Winforms (?)Ther is a 32k limit for control sizes. See [here](http://stackoverflow.com/questions/8064678/windows-forms-panel-32767-size-limit) and [here](http://stackoverflow.com/questions/25709069/the-maximum-number-of-characters-a-textbox-can-display/25709337#25709337). Not sure if your values translate to such pixel sizes but it better not! – TaW Jun 15 '16 at 15:16
  • @TaW I am not plotting 32K+ points! I can see the series lines perfectly well. It is just the stripline... – ManInMoon Jun 15 '16 at 15:20
  • How wide is your chart? Is it perhaps that the offset (41000) is outside the bounds of what you can see? – DavidG Jun 15 '16 at 15:28
  • Actually I found the bug. I was cross-threading and for some reason was NOT getting an error message to inform me of this. I now invoke Adding the StripLine and it works fine... – ManInMoon Jun 15 '16 at 15:57
  • Ah. Just tested your code and wanted to report back that it works fine here :-) – TaW Jun 15 '16 at 15:58

0 Answers0