<div id="{{ chartId }}" style="width:{{ myWidth }}px; height:{{ myHeight }}px;"></div>
<script>
    require.config({
         paths:{
            echarts: '{{host}}/echarts.min',
            china: '{{host}}/china',
            world: '{{host}}/world'// Please do not add a comma here
            {%if location %},/*here is the comma*/ {{location}}: '{{host}}/{{location}}' {% endif %}
         }
    });
    require(['echarts', 'china', 'world' {% if location %}, /*same here*/'{{location}}'{% endif %}],function(ec){
    var myChart = ec.init(document.getElementById('{{ chartId }}'));
               var option =  {{ myOption }};
               myChart.setOption(option);
    });
</script>
