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.

Custom Point text

Thread ID:

Created:

Updated:

Platform:

Replies:

68445 Sep 21,2007 09:57 AM Apr 24,2009 03:17 AM Windows Forms 8
loading
Tags: Chart
Amol Prakash
Asked On September 21, 2007 09:57 AM

How can I change the text orientation of custom points? For example, make it vertical instead of horizontal. In general, how can I rotate it?

Amol Prakash
Replied On September 21, 2007 09:58 AM

Also, is there a way to add a "tooltip" kind of feature to a custom point? i.e., a text shows up when the user hovers the mouse over the custom point?

>How can I change the text orientation of custom points? For example, make it vertical instead of horizontal. In general, how can I rotate it?

Jeba S [Syncfusion]
Replied On September 28, 2007 03:12 AM

Hi Amol,

Thank you for your interest in Syncfusion Essential Studio.

Please refer the following details:

Query 1:Change the text orientation of custom points

The question you have posted has raised some very significant issues, as this might be a Feature Request. We will get back to you within 2 business days with a complete response after due analysis of these issues.

Query 2:Tooltip for a custom point

There is no direct property for setting Tooltip for a custom point but you can achieve this by handling the ChartRegionMouseEnter. In the event handler you can get the mouse point and convert the mouse point into chart point.Then check the chart point coordinates with the custom points X and Y values and set the Tooltip accordingly.


ChartCustomPoint cp2=new ChartCustomPoint();
// Point that uses chart coordinates
cp2.CustomType = ChartCustomPointType.ChartCoordinates;
cp2.XValue = 2003;
cp2.YValue = 289;
cp2.Symbol.Shape = ChartSymbolShape.Diamond;
cp2.Alignment = ChartTextOrientation.Smart;
cp2.Color = Color.SkyBlue;
cp2.Symbol.Color = Color.Red;
cp2.Text = "(Any X,Y value in the plot)";
this.chartControl1.CustomPoints.Add(cp2)

ToolTip toolTip1 = new ToolTip();
private void chartControl1_ChartRegionMouseEnter(object sender, ChartRegionMouseEventArgs e)
{
Point mousePoint = new Point(e.Point.X, e.Point.Y);
ChartPoint chpt = chartControl1.ChartArea.GetValueByPoint(new Point(e.Point.X, e.Point.Y));
if ((chpt.X==cp2.XValue) &&(chpt.YValues[0]==cp2.YValue))
{
toolTip1.SetToolTip(chartControl1, "Over custom points");
}
}


Kindly let us know if you need any further assistance.

Best Regards,
Jeba.

Mia Lee
Replied On April 21, 2009 06:17 PM

ChartCustomPoint cp2=new ChartCustomPoint();
// Point that uses chart coordinates
cp2.CustomType = ChartCustomPointType.ChartCoordinates;
cp2.XValue = 2003;
cp2.YValue = 289;
cp2.Symbol.Shape = ChartSymbolShape.Diamond;
cp2.Alignment = ChartTextOrientation.Smart;
cp2.Color = Color.SkyBlue;
cp2.Symbol.Color = Color.Red;
cp2.Text = "(Any X,Y value in the plot)";
this.chartControl1.CustomPoints.Add(cp2)

ToolTip toolTip1 = new ToolTip();
private void chartControl1_ChartRegionMouseEnter(object sender, ChartRegionMouseEventArgs e)
{
Point mousePoint = new Point(e.Point.X, e.Point.Y);
ChartPoint chpt = chartControl1.ChartArea.GetValueByPoint(new Point(e.Point.X, e.Point.Y));
if ((chpt.X==cp2.XValue) &&(chpt.YValues[0]==cp2.YValue))
{
toolTip1.SetToolTip(chartControl1, "Over custom points");
}
}


I have tried the above code (version 7.1) and even though I am over the custom chart, it is not displaying the tooltip.

Any ideas?



Manimala S [Syncfusion]
Replied On April 22, 2009 09:24 AM

Hi Lee,

Just include the below line in the form_load event.

this.chartControl1.ShowToolTips = true;

This will solve your issue.

Kindly, let me know if it works.

Thanks,
Manimala


Mia Lee
Replied On April 22, 2009 11:48 AM

It is set to true. When I click anywhere in the custom chart point, the chartPoint is not equalling the custom chart point. It's close but not close enough to make the tool tip come up.

any ideas??

Does z order or ChartDateTimeIntervalType.Auto have anything to do with it???


Mia Lee
Replied On April 22, 2009 12:02 PM

It is set to true. When I click anywhere in the custom chart point, the chartPoint is not equalling the custom chart point. It's close but not close enough to make the tool tip come up.

any ideas??

Does z order or ChartDateTimeIntervalType.Auto have anything to do with it???


Manimala S [Syncfusion]
Replied On April 23, 2009 10:25 AM

Hi Lee,

I am working on it. will update you once I have got that.

Thanks,
Manimala.


Manimala S [Syncfusion]
Replied On April 24, 2009 03:17 AM

Hi Lee,

I was not able to reproduce your issue. Can you please send me the sample, so that I can analyze and give you the solution.

Thanks,
Manimala.


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.

;