【发布时间】: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,这将自动格式化代码。上面的代码不可读。
-
只要这段代码没有被格式化并且没有添加正确的问题,我就无法进一步帮助你。请更新您的问题,目前我投票决定关闭此问题,因为它不清楚。