We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Drawing rectangular highlight region on chart area

Hi,

I would like to copy the behavior of Syncfusion's zooming feature. In other words, I would like to draw a rectangle that highlights the area that the user clicks and drags.

I am able to do this - almost. The problem I am having is, when the user stops moving the mouse, the rectangle disappears. My suspicion is that the chart is repainting on top of the rectangle. How do I prevent this?

I have attached an example. Observe that when you click on the chart and drag, you see a rectangle, but when you stop moving the mouse, it disappears.

Please advise. Thank you very much,
BenT

ChartSandbox.zip

3 Replies

AD Administrator Syncfusion Team December 21, 2006 12:50 AM UTC

Hi BenT,

Here is a modified sample attached which will help you to draw rectangle area in chart area using ‘Graphics.FillRectangle()’ method and Chart Control’s ‘ChartAreaPaint’ event.

Please take a look into the sample attached.

Modified ChartSandbox sample

Please let me know if you have any more questions.

Thanks for using Syncfusion products.

Best Regards,
Sureshbabu


AD Administrator Syncfusion Team December 21, 2006 04:54 AM UTC

Hi BenT,

Thank you for using Syncfusion products.

Please take a look at the attached sample.

Let me know if this helps.

Regards,
Rashidha.

Modified ChartSandbox.zip


AD Administrator Syncfusion Team December 22, 2006 07:29 PM UTC

Hi BenT,

Please find the sample attached which will help you to select a rectangle area and release the selected rectangle area after mouse button release.

Modified ChartSandbox sample

Please let me know if this sample helps.

Please let me know if this helps.

Thanks for your interest in Syncfusion products.

Best Regards,
Sureshbabu

Loader.
Live Chat Icon For mobile
Up arrow icon