diff --git a/chapter2/mysite/myapp/static/scripts/trend.js b/chapter2/mysite/myapp/static/scripts/trend.js index 012f81b..4145c0f 100755 --- a/chapter2/mysite/myapp/static/scripts/trend.js +++ b/chapter2/mysite/myapp/static/scripts/trend.js @@ -13,7 +13,8 @@ $(function(){ var myColor = ['#1089E7', '#F57474', '#56D0E3', '#F8B448', '#8B78F6']; var histogramChart1 = echarts.init(document.getElementById('histogramChart1')); - histogramChart1.setOption({ + if(histogramChart1){ + histogramChart1.setOption({ color:['#5bc0de'], grid:{ @@ -75,6 +76,8 @@ $(function(){ }, ] }) + } + //主要症状 var histogramChart2 = echarts.init(document.getElementById('histogramChart2')); @@ -141,7 +144,8 @@ $(function(){ //传染病发病趋势 var lineChart1 = echarts.init(document.getElementById('lineChart1')); - lineChart1.setOption({ + if(lineChart1){ + lineChart1.setOption({ title: { text: '访问趋势', textStyle:{ @@ -219,6 +223,8 @@ $(function(){ ] }) + } + //TOP10销量趋势 var histogramChart3_names = [];