【发布时间】:2016-06-15 09:04:01
【问题描述】:
在my fiddle,我正在尝试replicate 绘制DevExpress's DevExtreme doughnut chart:
var dataSource = [{
region: "Asia",
val: 4119626293
}, {
region: "Africa",
val: 1012956064
}, {
region: "Northern America",
val: 344124520
}, {
region: "Latin America and the Caribbean",
val: 590946440
}, {
region: "Europe",
val: 727082222
}, {
region: "Oceania",
val: 35104756
}];
$("#container").dxPieChart({
dataSource: dataSource,
title: "The Population of Continents and Regions",
tooltip: {
enabled: true,
format: "millions",
percentPrecision: 2,
customizeTooltip: function(arg) {
return {
text: arg.valueText + " - " + arg.percentText
};
}
},
legend: {
horizontalAlignment: "right",
verticalAlignment: "top",
margin: 0
},
series: [{
type: "doughnut",
argumentField: "region",
label: {
visible: true,
format: "millions",
connector: {
visible: true
}
}
}]
});
#container {
height: 440px;
width: 100%;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="container"></div>
此official code 在ChartJS's fiddle 工作。
由于我不是在 ASP.NET MVC 项目中这样做,chartjs after the DevExpress MVC scripts shall not be an issue
我在这里错过了什么?
【问题讨论】:
-
您有一些错误。检查控制台。
标签: javascript jquery html css devextreme