I got this to work locally where index.html and echarts.js are in the same folder.
How would I do this in C3? I tries the HTML element but it's giving me grief. HTML and JS are my nemesis.
This is the index.html file:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>ECharts</title> <!-- Include the ECharts file you just downloaded --> <script src="echarts.js"></script> </head> <body> <!-- Prepare a DOM with a defined width and height for ECharts --> <div id="main" style="width: 600px;height:400px;"></div> <script type="text/javascript"> // Initialize the echarts instance based on the prepared dom var myChart = echarts.init(document.getElementById('main')); // Specify the configuration items and data for the chart var option = { title: { text: 'ECharts Example' }, tooltip: {}, legend: { data: ['sales'] }, xAxis: { data: ['Shirts', 'Cardigans', 'Chiffons', 'Pants', 'Heels', 'Socks'] }, yAxis: {}, series: [ { name: 'sales', type: 'bar', data: [5, 20, 36, 10, 10, 20] } ] }; // Display the chart using the configuration items and data just specified. myChart.setOption(option); </script> </body> </html>
https://echarts.apache.org/en/index.html
I believe you need to dowload echarts.js or echarts.min.js and put it to Scripts folder in the project. In script properties (on the left panel) select "Main script". If it doesn't work, try "Import for events".
Develop games in your browser. Powerful, performant & highly capable.
Put echarts.js into the scripts folder, selected it as "Main script". Profit!
More coffee coming your way :)