我没有得到tooltip dojo 1.10饼图

时间:2014-06-25 06:24:46

标签: charts dojo

require(["dojox/charting/Chart", "dojox/charting/plot2d/Pie", "dojox/charting/action2d/Highlight","dojox/charting/action2d/MoveSlice" , "dojox/charting/action2d/Tooltip","dojox/charting/themes/MiamiNice","dojo/ready"],
      function(Chart, Pie, Highlight, MoveSlice, Tooltip, MiamiNice, ready){
      ready(function(){
        var chartTwo = new Chart("chartTwo");
        chartTwo.setTheme(MiamiNice)
         .addPlot("default", {
            type: Pie,
            font: "normal normal 11pt Tahoma",
            fontColor: "black",
            labelOffset: -30,
            radius: 80
        }).addSeries("Series A", [
            {y: 4, text: "Red",   stroke: "black", tooltip: "Red is 50%"},
            {y: 2, text: "Green", stroke: "black", tooltip: "Green is 25%"},
            {y: 1, text: "Blue",  stroke: "black", tooltip: "I am feeling Blue!"},
            {y: 1, text: "Other", stroke: "black", tooltip: "Mighty <strong>strong</strong><br>With two lines!"}
        ]);
        var anim_c = new Tooltip(chartTwo, "default");
        var anim_a = new MoveSlice(chartTwo, "default");
        var anim_b = new Highlight(chartTwo, "default");

        chartTwo.render();

      });
    });

1 个答案:

答案 0 :(得分:0)

很难知道,因为你的格式不好,但也许你错过了正确渲染工具提示所需的CSS?

您是否尝试过包含此CSS:

<link rel="stylesheet" href="dojoinstall/dijit/themes/claro/claro.css">

并在你的身上设置claro CSS类:

<body class="claro">

你还明确提到1.10,是否是以前版本的回归?如果是,在这种情况下,最好的方法是填写Dojo跟踪器上的错误。

相关问题