【问题标题】:iam not getting tool tip dojo 1.10 pie chart我没有得到工具提示 dojo 1.10 饼图
【发布时间】:2014-06-25 06:24:46
【问题描述】:
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();

      });
    });

【问题讨论】:

  • 请正确格式化代码。要格式化代码,请选择代码并按 ctrl-k,这将自动格式化代码。上面的代码不可读。
  • 只要这段代码没有被格式化并且没有添加正确的问题,我就无法进一步帮助你。请更新您的问题,目前我投票决定关闭此问题,因为它不清楚。

标签: charts dojo


【解决方案1】:

由于您的格式不佳,很难知道,但也许您缺少正确呈现工具提示所需的 CSS?

您是否尝试过包含此 CSS:

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

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

<body class="claro">

您还明确提到 1.10,这是从以前版本的回归吗?如果是,那么最好的方法是在 Dojo 跟踪器上填写一个错误。

【讨论】:

  • 是的,我在标题 css 中添加了 和 但无法显示图表
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-11-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多