Просто чтобы проследить
HTML
<div id="chart2" class="test2" style="margin-top:20px; margin-left:20px; width:460px; height:300px;"></div>
Данные
var data1 = [
['Verwerkende industrie', 9],
['Retail', 3],
['Primaire producent', 4],
['Out of home', 2],
['Groothandel', 7],
['Grondstof', 9],
['Consument', 3],
['Bewerkende industrie', 2]
];
, поэтому вместо этого
var plot2 = $.jqplot($('chart2'), [ data1 ], {
title: ' ',
seriesDefaults: {
shadow: false,
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
startAngle: 180,
sliceMargin: 4,
showDataLabels: true
}
},
legend: {
show:true, location: 'w'
}
}
);
Вы можете сделатьэто
$(".test2").jqplot( [data1] , {
title: ' ',
seriesDefaults: {
shadow: false,
renderer: jQuery.jqplot.PieRenderer,
rendererOptions: {
startAngle: 180,
sliceMargin: 4,
showDataLabels: true
}
},
legend: {
show:true, location: 'w'
}
}
);