MediaWiki:ECharts.js

/** * ECharts * Put ECharts on wiki pages * Apache licenses https://www.echartsjs.com **/ $(function {  mw.loader.load('https://cdn.bootcss.com/echarts/4.4.0-rc.1/echarts.min.js'); // ECharts CDN  $('.echarts, .ECharts, .Echarts').each(function  { var $this = $(this), option = eval("(" + $this.text + ")"), echartsElement = 'echartsElement-' + $this.index; $this.attr({ 'id': echartsElement }) echarts.init(document.getElementById(echartsElement)).setOption(option); }); });