3
我需要在將圖的一部分懸停後進行回調(donught)。我怎樣才能做到這一點?從理論上講,chart.js之不提供回調,所以這是一個問題:)Chart.js - 懸停後回調
我當前的代碼:
var visitorsChart = [
{
value: 60,
color:'#3e89dc'
},
{
value: 40,
color:'#88c600'
}
]
var visitorsChartOptions = {
percentageInnerCutout: 70
}
var renderVisitorsChart = new Chart(document.getElementById("visitors-chart").getContext("2d"), {tooltips: {position: 'bottom left', background: 'rgba(255,255,255,0)', fontFamily: 'Open Sans', fontSize: '40px', fontWeight: '700', labelTemplate:'<%=value%>'}, border: {width:0}, showShadow: false}).Doughnut(visitorsChart, visitorsChartOptions);