Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
635
ChartCrosshairBehaviors Error
posted

hello,
I used your extension ChartCrosshairBehaviors for a horizontal bar in xamdatachart.

But there is a bug:

explanation:


My Xamdatachart has an Y axis. When the mouse pointer enters the area of  Xamdatachart from the side of Y axis  the  exention  causes ChartCrosshairBehaviors a runtime error:

Error message:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


Line Causes error in ChartCrosshairVisibilityBehavior.cs:

bool uninitialized = lines[0].X1 == 0.0 && lines[0].X2 == 0.0 &&
lines[1].X1 == 0.0 && lines[1].X2 == 0.0;

Remarks:

I think because the Y axis is part of the XamDatachart and when the mouse pointer enters from the side of Y axis, the Event (chart.MouseEnter + = OnChartMouseEnter) is caused. At this time the xamdatachart in question has not yet lines. what causes the bug.

Thank you for helping me find a solution.

Regards.

Parents Reply Children
No Data