Charts 饼图自定义工具提示

Charts 饼图自定义工具提示,charts,tooltip,pie-chart,Charts,Tooltip,Pie Chart,我曾尝试为谷歌饼图定制工具提示,但未能成功。是否仍然可以自定义饼图工具提示?我需要这样的工具提示: 最后,我找到了更改饼图的工具提示HTML的方法 google.visualization.events.addListener(chart, 'onmouseover', function (e) { // e.row contains the selected row number in the data table $(".google-visualization-toolt

我曾尝试为谷歌饼图定制工具提示,但未能成功。是否仍然可以自定义饼图工具提示?我需要这样的工具提示:


最后,我找到了更改饼图的工具提示HTML的方法

google.visualization.events.addListener(chart, 'onmouseover', function (e) { 
    // e.row contains the selected row number in the data table
    $(".google-visualization-tooltip").html("your html here");
});

也许这对你有用。我自己做了一张饼图。它很轻,您可以自定义它:

您可以创建一个蛋糕:

//create the pieces of the pie (size, Name, color, relative size-will be calculatet later)
var p1= new Kuchenstueck(33,"Stueck1","949bc2",0); 
var p2= new Kuchenstueck(10,"Stueck2","5d5f6c",0); 
var p2= new Kuchenstueck(20,"Stueck3","96ccae",0); 

var kuchen = {kuchenstuecke: [p1,p2,p3], auffuellen:true, absoluteGroesse:0, mx:180, my:180, r:180, imgSizeX:360, imgSizeY:360};
并将其命名为html元素:

$(".torte").append(createKuchen(kuchen));

请注意:一些参数尚未实现,kuchen是pie的德语单词:)

这对我不起作用,我没有看到任何此类类添加到工具提示中
$(".torte").append(createKuchen(kuchen));