Hi again,
Thanks for quick respons. I´m sorry, but it doesn´t help: both divs and scripts are loaded in correct place, but only the latter chart is shown – in the first container btw.
I have tried it on two different wp installations with the same result:
The snippets:
1:
<div id=”canvas-holder-2″ style=”width:30%; direction:ltr; margin-left:auto; margin-right:auto; display:table;”>
<canvas id=”chart-area” width=”250″ height=”250″/>
</div>
<script>
var doughnutData = [
{
value: 43667,
color: “#ec8316”,
highlight: “#ff8300”,
label: “DM orange”
},
{
value: 453,
color: “#AF23A5”,
highlight: “#9d3292”,
label: “DM rosa”
},
{
value: 80924,
color: “#66008C”,
highlight: “#522e91”,
label: “DM lilla”
},
{
value: 896,
color:”#568E14″,
highlight: “#5d9632”,
label: “DM gron”
},
{
value: 88,
color: “#00829B”,
highlight: “#0083a8”,
label: “DM turkis”
}
];
window.onload = function(){
var ctx = document.getElementById(“chart-area”).getContext(“2d”);
window.myDoughnutChart = new Chart(ctx).Doughnut(doughnutData, {
responsive:true, segmentShowStroke : true, segmentStrokeColor : “#fff”, segmentStrokeWidth : 2, percentageInnerCutout : 50
});
};
</script>
2:
<div id=”canvas-holder-1″ style=”width:30%; direction:ltr; margin-left:auto; margin-right:auto; display:table;”>
<canvas id=”chart-area” width=”250″ height=”250″/>
</div>
<script>
var doughnutData = [
{
value: 10913 ,
color: “#ec8316”,
highlight: “#ff8300”,
label: “DM orange”
},
{
value: 2693,
color: “#AF23A5”,
highlight: “#9d3292”,
label: “DM rosa”
},
{
value: 4104,
color: “#66008C”,
highlight: “#522e91”,
label: “DM lilla”
},
{
value: 26832,
color:”#568E14″,
highlight: “#5d9632”,
label: “DM gron”
},
{
value: 21443,
color: “#00829B”,
highlight: “#0083a8”,
label: “DM turkis”
}
];
window.onload = function(){
var ctx = document.getElementById(“chart-area”).getContext(“2d”);
window.myDoughnutChart = new Chart(ctx).Doughnut(doughnutData, {
responsive:true, segmentShowStroke : true, segmentStrokeColor : “#fff”, segmentStrokeWidth : 2, percentageInnerCutout : 50
});
};
</script>
I have also tried with the polar example form your blog with the same result …
I really hope you´re able to fix it, because the idea behind the plugin is very, very good…
best regards
Ole