HighCharts:3D 饼图不显示
HighCharts : 3D Pie Chart Not Displaying
下面是我的代码:
exec_dashboard_load_chart('exec_dashboard_gender_chart',response);
/**
* A function that loads a chart.
*/
function exec_dashboard_load_chart(id , data){
var myChart = Highcharts.chart(id, {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: data
});
}
数据变量包含以下值:
这是我的fiddle。
为什么我的 3d 图表不显示?我没有发现错误。我认为我的数据有问题。谁能指点我,我哪里不见了?
看看这个Working Fiddle
function exec_dashboard_load_chart(id , data){
var myChart = Highcharts.chart(id, {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
data: data.data
}]
});
}
下面是我的代码:
exec_dashboard_load_chart('exec_dashboard_gender_chart',response);
/**
* A function that loads a chart.
*/
function exec_dashboard_load_chart(id , data){
var myChart = Highcharts.chart(id, {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: data
});
}
数据变量包含以下值:
这是我的fiddle。
为什么我的 3d 图表不显示?我没有发现错误。我认为我的数据有问题。谁能指点我,我哪里不见了?
看看这个Working Fiddle
function exec_dashboard_load_chart(id , data){
var myChart = Highcharts.chart(id, {
chart: {
type: 'pie',
options3d: {
enabled: true,
alpha: 45,
beta: 0
}
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
depth: 35,
dataLabels: {
enabled: true,
format: '{point.name}'
}
}
},
series: [{
type: 'pie',
data: data.data
}]
});
}