-1
頁面
的spcific一部分,我有此腳本動畫圖表上開始的
var doughnutData = [
{
value: 10,
color:"#444444",
highlight: "#535353",
label: "Contrato de Assistência"
},
{
value: 25,
color: "#707070",
highlight: "#7F7F7F",
label: "Assistência Técnica"
},
{
value: 10,
color: "#CECECE",
highlight: "#E2E2E2",
label: "Entrega ao Domicílio"
},
{
value: 55,
color: "#262626",
highlight: "#383838",
label: "Atendimento ao Público"
}
];
window.onload = function(){
var ctx = document.getElementById("chart-area").getContext("2d");
window.myDoughnut = new Chart(ctx).Doughnut(doughnutData, {responsive : true});
};
這是這樣一個http://codepen.io/IanVS/pen/EaZWyo動畫圓環圖。
但是當頁面加載並且我想啓動頁面的特定部分時,動畫開始。
[如何使Chart.js動畫滾動到該部分時可能的重複?](http://stackoverflow.com/questions/18772547/how-to-make-the-chart-js-animate-when -scrolled到該截面) – Goowik