eCharts as JavaScript external chart library

Thks Tottally for the tip... But yes I'm aware of the basic debugging techniques.

Just for the record... things are working OK now. The issue was that the 1st I tested sourcing the Java scripts from the webpage itself and the test page I had prepared was DLing quite a bit, (since I am on a Pi with Poor Wifi signal the connection is bad, sometimes I even loose the remote ssh connection... yes, I know... I should take care of it! :slight_smile: ) and I didn't wait long enough! (it took quite a few secs)...
So I immidiately changed into sourcing the scripts locally, thinking something was wrong :frowning: and the error was another one now... A simple '/' beggining slash was the issue. :sob:

As a ref for others I'm posting below the basic flow test and just the snippet of template code. Don't forget to add echarts folder to a public folder/library of yours (after defining it in settings.js httpstatic part if you have not done so yet):

<script src="/echarts/build/dist/echarts-all.js"></script>
<div id="chart" style="width: 400px; height: 300px;"></div>
<script>
    var chart = document.getElementById('chart');
    var myChart = echarts.init(chart);
    var option = { ...here you set your graphs options... }
    myChart.setOption(option);
</script>

Thks for the help anyway!

2 Likes