动画不适用于外部数据

时间:2019-09-03 13:37:03

标签: amcharts

设计上是当我使用外部数据时动画不起作用吗?

https://codepen.io/abdfahim/pen/JjPreGY

am4core.useTheme(am4themes_animated);

var chart = am4core.create("chartdiv", am4charts.XYChart);

chart.dataSource.url = "https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-160/sample_data_serial.json";


var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
categoryAxis.dataFields.category = "year";

var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());

var series1 = chart.series.push(new am4charts.ColumnSeries());
series1.tooltipText = "{name}: {valueY.value}";
series1.name = "Series 1";
series1.dataFields.categoryX = "year";
series1.dataFields.valueY = "cars";

0 个答案:

没有答案