var myChart = ec.init(document.getElementById('{{ chart_id }}')); var option = {{ my_option }}; myChart.setOption(option);