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

EssentialChart (LineChart ) Tooltip on Mouse over

Hi all,

i will do something in my Web application, that work's fine on a windows programm. I'm using syncfusion in the newest version (6.1.0.34).
I'm drawing a line diagramm and show every point in the diagramm with a square. If i take the mouse at one of this point, i will show the values of this point and only of this point in a tooltip (in my example time and a money value).
Can somebody help me? Is this possible with asp.net?

Thank you,
Stephan


4 Replies

RS Rajarajeswari S Syncfusion Team January 10, 2008 12:49 PM UTC

Hi Stephan,

To apply tool tip to the chart the PointsToolTipFormat property has to be set. Please refer the below code snippet which illustrates this:

this.ChartWebControl1.Series[0].PointsToolTipFormat = "{2}";

The PrepareStyle event apply tooltip with the specified text. Please refer the below code snippet which illustrates this:

private void Series_PrepareStyle(object sender, ChartPrepareStyleInfoEventArgs args)
{
ChartSeries series = sender as ChartSeries;
if (series != null)
{
DateTime dateTime = series.Points[args.Index].DateX;
string xValue = dateTime.ToString("dd/MM/yyyy HH:mm");
//ToolTip associated with the ChartPoint
args.Style.ToolTip = xValue.ToString() + "," + series.Points[args.Index].YValues[0].ToString();
args.Handled = true;
}
}
Please refer the sample from the below link which explains you the above:

http://websamples.syncfusion.com/samples/Chart.Web/6.1.0.34/F70940/main.htm

And also you can get more details on the tooltip property of the chart from the below link:

http://www2.syncfusion.com/ug_61/gridwin/default.html

Please let me know if this helps you out.

Regards,
Raji




SD Steffen Dunst January 10, 2008 03:36 PM UTC

Hi again,

maybe im to stupid but it doesn't work on my project. I have my project attached to this mail, maybe you can have a look on it.

Thank's Stephan

>Hi Stephan,

To apply tool tip to the chart the PointsToolTipFormat property has to be set. Please refer the below code snippet which illustrates this:

this.ChartWebControl1.Series[0].PointsToolTipFormat = "{2}";

The PrepareStyle event apply tooltip with the specified text. Please refer the below code snippet which illustrates this:

private void Series_PrepareStyle(object sender, ChartPrepareStyleInfoEventArgs args)
{
ChartSeries series = sender as ChartSeries;
if (series != null)
{
DateTime dateTime = series.Points[args.Index].DateX;
string xValue = dateTime.ToString("dd/MM/yyyy HH:mm");
//ToolTip associated with the ChartPoint
args.Style.ToolTip = xValue.ToString() + "," + series.Points[args.Index].YValues[0].ToString();
args.Handled = true;
}
}
Please refer the sample from the below link which explains you the above:

http://websamples.syncfusion.com/samples/Chart.Web/6.1.0.34/F70940/main.htm

And also you can get more details on the tooltip property of the chart from the below link:

http://www2.syncfusion.com/ug_61/gridwin/default.html

Please let me know if this helps you out.

Regards,
Raji






WebTest.zip


SD Steffen Dunst January 14, 2008 03:50 PM UTC

No idea what's the problem is???

Stephan





RS Rajarajeswari S Syncfusion Team January 23, 2008 05:14 AM UTC


Hi Stephan,

Sorry for the long delay in getting back to you.

Thanks for giving the sample to reproduce the issue. To make Tooltip to visible it is important to set the CalcRegions propety as True to the ChartWebControl. Your application is working perfectly after setting this property. Please refer the below code snippet of this property:


this.ChartWebControl1.CalcRegions=true;


You can set this property in aspx page also.

Please refer the VideoClip of your application with Tooltip from the below link:

http://www.syncfusion.com/support/user/uploads/tooltip_1a5fad6b.zip

Please refer the modeified sample fromt he below link:

http://websamples.syncfusion.com/samples/Chart.Web/6.1.0.34/F40940_new/main.htm


Please let me know if this helps you out.

Regards,
Raji



Loader.
Live Chat Icon For mobile
Up arrow icon