I have got the resize thing working but when i use the pie chart at first everyting is oke but when i resize the container i get a big sqaure chart instead of the round pie.
How is this possible to fix?
The JS code:
$("table.chart-pie").each(function() {
var colors = [];
$("table.chart-pie thead th:not(:first)").each(function() {
colors.push($(this).css("color"));
});
$(this).graphTable({
series: 'columns',
position: 'replace',
width : '100%',
height: '250px',
colors: colors
}, {
series: {
pie: {
show: true,
pieStrokeLineWidth: 0,
pieStrokeColor: '#FFF',
radius: 100,
label: {
show: true,
radius: 3/4,
formatter: function(label, series){
return '<div style="font-size:11px; padding:2px; color: #FFFFFF;"><b>'+label+'</b>: '+Math.round(series.percent)+'%</div>';
},
background: {
opacity: 0.5,
color: '#000'
}
}
}
},
legend: {
show: false
},
grid: {
hoverable: false,
autoHighlight: false
}
});
});
When i set the width to 250px or someting then its working correct but i want that it be able to resize the chart
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…