formatting with shared tooltip

Apr 13, 2012 at 12:03 AM

Hi,

I'm trying to implement formatting with shared tooltips using multiple series (Highcharts JS sample).

So far I have changed the line in Tootip.cs to:

return String.Format("function(event){{ {0}; if(typeof(tmp) == 'function'){{return tmp(this);}}else{{ return tmp;}} }}", _formatter);

so by formatting the tooltip like this:

detailChart.Tooltip = new ToolTip("var tmp = '';"
            + "$.each(this.points, function (i, point) {"
            + "tmp += '<b>' + point.series.name + '</b><br/>' + Highcharts.dateFormat('%B %Y', this.x) + ':<br/>' +'VAMI: ' + Highcharts.numberFormat(point.y, 0) + '<br/>';"
            + "})"
            );

I'm getting the right JS code, but no tooltip. Any ideas?

Thanks.

May 24, 2012 at 10:48 AM

In the link you sent, the tooltip sample has the property "sharedtrue"

You may set this also in C#: detailChart.Tooltip.shared=true"