usp
usp

Reputation: 797

StripLines not showing up on MS Chart control in windows forms?

I am using a chart control to show some data as a Column Chart. The chart is set to support 'zooming' as well as striplines. It worked fine till friday. All of a sudden, the striplines started not showing up, the only way I can view them is by zooming in; even then they are not showing up at the correct location!!! I rebuilt the solution, tried removing and adding the reference to 'Visualization' library. I mean I can't think of anything else, afterall I haven't changed any code!!! Can anyone please explain whats going on??

Thanks.

Upvotes: 0

Views: 1294

Answers (1)

usp
usp

Reputation: 797

I guess I figured it out!! The 'IntervalOffset' on StripLine object is not calculated from the origin of the chart, its always from the starting point of the ChartAreat that the user can view[with zoom]. Also, the StripLines are added to the BackGround not the ForeGround of the ChartArea. So, if your zoom-level is less than the StripLine Interval, you cannot see it even when you scroll across the Axis.

Edit: My requirement was to highlight particular areas of the graph. So, I used CustomPainting instead of StripLines to add the 'Rectangles' to my chart foreground to highlight the areas! Hope Microsoft improves their documentation on StripeLines and Zoom features.

Upvotes: 1

Related Questions