Open ShimNamHee opened 4 years ago
google.charts.load('current', {packages: ['corechart']}); google.charts.setOnLoadCallback(drawChart);
function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Android', 5], ['iOS', 1], ['Etc', 213] ]); var options = { pieStartAngle: 100, legend: 'none', pieHole: 0.4, slices: { 0: { color: '#a7ce59' }, 1: { color: '#19a3e3' }, 2: { color: '#f45780' } } }; var chart = new google.visualization.PieChart(document.getElementById('donutchart')); chart.draw(data, options); }
android : 2.3 -> graph : 2.03 ios : 0.5 -> graph: 0.05 etc: 97.3 -> graph: 92.03
The first value of the decimal point comes out second. I don't know why.
Where are your "graph" numbers coming from, because they are wrong.
http://jsfiddle.net/dlaliberte/rLx01k79/2/
google.charts.load('current', {packages: ['corechart']}); google.charts.setOnLoadCallback(drawChart);
function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Android', 5], ['iOS', 1], ['Etc', 213] ]); var options = { pieStartAngle: 100, legend: 'none', pieHole: 0.4, slices: { 0: { color: '#a7ce59' }, 1: { color: '#19a3e3' }, 2: { color: '#f45780' } } }; var chart = new google.visualization.PieChart(document.getElementById('donutchart')); chart.draw(data, options); }
android : 2.3 -> graph : 2.03 ios : 0.5 -> graph: 0.05 etc: 97.3 -> graph: 92.03
The first value of the decimal point comes out second. I don't know why.