我无法为Google图表栏设置动画。 我查看了示例文档,但是我失败了。
google.charts.load('current', {packages: ['table']});
function drawBarFormatTable() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Department');
data.addColumn('number', 'Revenues');
data.addColumn('string', 'Depat');
data.addRows([
['Shoes', 1.98,'deneme'],
['Sports', -2.3,'deneme'],
['Toys', 3.4,'deneme'],
['Electronics', -0.2,'deneme'],
['Food', 2,'deneme'],
['Art', 2.5,'deneme']
]);
var table = new google.visualization.Table(document.getElementById('barformat_table'));
var formatter = new google.visualization.BarFormat({width: 250});
formatter.format(data, 1); // Apply formatter to second column
table.draw(data, {allowHtml: true, showRowNumber: true, width: '100%', height: '100%'});
}
google.charts.setOnLoadCallback(drawBarFormatTable);
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<div id="barformat_table" style="height: 150px"/>