您好,我正在尝试将图表从amchart 3更改为amchart 4,我使用的是laravel 5.7 Api。问题是,当我尝试从laravel的api url获取图形时,该图形显示“无法加载文件:我的laravel的url”
<script>
am4core.useTheme(am4themes_animated);
var chart = am4core.create("chartdiv", am4charts.XYChart);
chart.exporting.menu = new am4core.ExportMenu();
chart.dataSource.url = "http://192.168.43.137/sisperdes/grafik-idm/";
chart.dataSource.parser = "JSONParser";
.....
有人可以帮助解决这个问题吗?
答案 0 :(得分:0)
您可以解析为json
chart.dataSource.parser = new am4core.JSONParser();