PDA

View Full Version : [CLOSED] [Razor] How to use ChartTip?



Stijn
May 30, 2012, 11:34 AM
I'm having moderate success using ChartTip.


.Tips(Html.X().ChartTip()
.Width(140)
.Height(28)
.Renderer(r => r.Handler = "this.setTitle('Hello');")
)

1. How can I make it follow the mouse? There's no TrackMouse property available like here:

tips: {
trackMouse: true,
width: 140,
height: 28,
renderer: convertTime
}

2. The chart is loaded with JavaScript from a PartialViewResult. Reloading the chart causes (some?) tooltips to stay visible once shown.

Stijn
May 30, 2012, 2:15 PM
After a bit of trial and error, I found that enabling a theme/style takes care of positioning the tooltip near the mouse. So I'll have to find out the required CSS (can't use a theme since it overwrites my existing CSS). While it doesn't follow the mouse, it's good enough for now.

The second issue remains, however.


Edit
I'm running short on time and couldn't find the required CSS. For now, I've worked around both issues by using an iframe instead of loading to a div.
I assume the beta still needs some polishing to be ready for MVC?

Daniil
May 30, 2012, 3:12 PM
Hi,



1. How can I make it follow the mouse? There's no TrackMouse property available like here:

tips: {
trackMouse: true,
width: 140,
height: 28,
renderer: convertTime
}

Confirm. We are investigating the problem. TrackMouse should be available for ChartTip in Razor.


2. The chart is loaded with JavaScript from a PartialViewResult. Reloading the chart causes (some?) tooltips to stay visible once shown.

Could you start a new forum thread with an example to reproduce?


I assume the beta still needs some polishing to be ready for MVC?

Yes, that is true.

Stijn
May 30, 2012, 3:18 PM
Thank you for the reply. I'll try to open a new thread with example sometime next week.

Daniil
Jun 04, 2012, 8:16 PM
Vladimir has understood the source of the problem with ChartTip and will commit a fix soon.

I will notify you.

Daniil
Jun 05, 2012, 1:34 PM
The fix has been committed to SVN, revision #4070. Please update and retest.

Thanks again for the report.