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.
Unfortunately, activation email could not send to your email. Please try again.

HitRadius around Lines, not Points

Thread ID:

Created:

Updated:

Platform:

Replies:

69731 Nov 9,2007 09:10 AM Nov 14,2007 10:26 AM Windows Forms 4
loading
Tags: Chart
Torsten Goroll
Asked On November 9, 2007 09:10 AM

Hi,

I have written a diagramm, where the user can click the Lines to select a series. We talk about a series from typ Line.

The Problem is: if the user wants to select the line, he has to move the mouse at the concrete Position (+-0 px).

Is there a way to enter some kind of hit radius like that around points but for lines?

Kind regards
T. Goroll


Fathima Shalini P [Syncfusion]
Replied On November 12, 2007 06:46 AM


Hi Goroll,

Thanks for your interest in Syncfusion Products.

Please do find the sample in the following link.

http://websamples.syncfusion.com/samples/Chart.Windows/HitTestRadius/main.htm

I have just added 2 data points for a Line Chart. I have used HitTestRadius property. Please do find this in the following code snippet.

series.Points.Add(1, 10);
series.Points.Add(2, 30);
series.Style.HitTestRadius = 50;

• When you right click close to the line you could see the context menu with only Series Type option.

• If you right click on some other area you could see context menu with some more options like Series, Mode etc.

We can increase the bounds by setting larger values for the HitTestRadius property as follows.

series.Style.HitTestRadius = 125;

I believe that provided details will help you with this regard and please let me know if you have any more queries regarding.

Regards,
Fathima Shalini.P



Torsten Goroll
Replied On November 12, 2007 08:07 AM

Hi Fathima,

the hit radius is a good property to make it easier to the user, to select points. But what I'm looking for, is a mechanism to make it easier for the user to select lines.

I hope that describes the problem better.

Kind regards

Torsten


Fathima Shalini P [Syncfusion]
Replied On November 14, 2007 08:12 AM

Hi Torsten,

Essential Chart does not support any built in function to select a series in Line Chart at run time and also to adjust the hit distance based on the line reference. We can achieve the selection look by adding custom points at the ends of the lines in the series. Please refer the below sample that shows how to display custom points to highlight when you click a particular line in ChartArea.

http://websamples.syncfusion.com/samples/Chart.Windows/F69731_1/main.htm

Please try this and let me know if this helps.

Regards,
Fathima



Torsten Goroll
Replied On November 14, 2007 10:26 AM

Hi,

I've solved it through a trick. I'm highlighting the line when it is clickable, so the user becomes a feeling when he can click.

The soulution with the helper points is a dirty hack, don't you think?

Thanks for your help,
Torsten


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;