我正在为我的网页绘制一个图表,我从这个视频中学到了 https://youtu.be/qYkkyOzR9jc 我正在尝试为我的图表添加标签,但它不起作用并且使我的图表错误这是我的 HTML代码
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="JS/dx.chartjs.js"> </script>
<script type="text/javascript" src="http://cdn3.devexpress.com/jslib/13.1.7/js/dx.chartjs.js"> </script>
<script type="text/javascript" src="JS/PieChart.js"></script>
</head>
<body>
<div id="chartContainer" style="border: 1px solid red; "></div>
</body>
</html>
这是我的 JavaScript 代码
$(document).ready(function(){
var dataSource = [
{ country: "Russia", area: 1707540},
{ country: "Canada", area: 998467},
{ country: "USA", area: 937261},
{ country: "China", area: 959696},
{ country: "Brazil", area: 854700},
{ country: "Australia", area: 768685},
{ country: "India", area: 328759},
{ country: "Others", area: 554545}
];
$("#chartContainer").dxPieChart({
dataSource: dataSource,
series: {
argumentField: "country",
valueField: "area",
label: {
visible: true,
connector: {visible: true}
}
}
});
})
这是我没有标签的图表
这是我添加标签元素后的错误图表