私の要件に従って、以下のようにjQuery Pie Chart(HighCharts)のセクターにパーセンテージ(セクターのサイズ)を追加する必要があります
しかし、私の円グラフは、セクターに関するテキストなしでこのようなものです
円グラフのセクターにテキストを表示するために、.js ファイルで多くの属性を試しましたが、うまくいきませんでした。
これが私の.jsファイルです
$(function () {
var chart;
$(document).ready(function () {
// Build the chart
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'Browser market shares at a specific website, 2010'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage}%</b>',
percentageDecimals: 1
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [{
type: 'pie',
name: 'Browser share',
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
},
['Safari', 8.5],
['Opera', 6.2],
['Others', 0.7]
]
}]
});
});
});
このグラフは、表示されている div にレンダリングされています
<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
セクターにテキストが表示されるように、.js ファイルに追加できるコードを教えてください。