| | |
| | | </div> |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header">近7天抓拍统计</div> |
| | | <!-- <div class="layui-card-header">近7天抓拍统计</div>--> |
| | | <div class="layui-card-header">近7天玉米出库最低单价统计</div> |
| | | <div class="layui-card-body"> |
| | | <div id="snapChartsWeek" style="height: 300px;"></div> |
| | | </div> |
| | |
| | | myCharts4.setOption({series: [{data: mainData.weekAiNumList}]}); |
| | | |
| | | /** 渲染周统计图表 */ |
| | | var myCharts5 = echarts.init(document.getElementById('snapChartsWeek')); |
| | | var options5 = { |
| | | // var myCharts5 = echarts.init(document.getElementById('snapChartsWeek')); |
| | | // var options5 = { |
| | | // tooltip: {trigger: 'axis', axisPointer: {lineStyle: {color: '#E0E0E0'}}}, |
| | | // color: ['#FFA800'], |
| | | // legend: { |
| | | // orient: 'vertical', right: '0px', top: '0px', |
| | | // data: ['抓拍数'], textStyle: {color: '#595959'} |
| | | // }, |
| | | // grid: {top: '75px', left: '35px', right: '55px', bottom: '40px'}, |
| | | // xAxis: { |
| | | // name: '日期', |
| | | // nameTextStyle: {color: '#595959'}, |
| | | // type: 'category', |
| | | // data: mainData.weekSnapDateList, |
| | | // axisLine: {lineStyle: {color: '#E0E0E0'}, symbol: ['none', 'arrow'], symbolOffset: [0, 10]}, |
| | | // axisLabel: {color: '#8c8c8c'}, |
| | | // axisTick: {alignWithLabel: true} |
| | | // }, |
| | | // yAxis: { |
| | | // name: '数量', |
| | | // nameTextStyle: {color: '#595959'}, |
| | | // type: 'value', |
| | | // boundaryGap: ['0', '20%'], |
| | | // axisTick: {show: false}, |
| | | // axisLine: {lineStyle: {color: '#E0E0E0'}, symbol: ['none', 'arrow'], symbolOffset: [0, 10]}, |
| | | // axisLabel: {color: '#8c8c8c'}, |
| | | // splitLine: {show: false}, |
| | | // splitArea: {show: false}, |
| | | // minInterval: 1 |
| | | // }, |
| | | // series: [{ |
| | | // name: '抓拍信息', type: 'bar', stack: 'one', barMaxWidth: '30px', |
| | | // label: {normal: {show: true, position: 'inside'}} |
| | | // }] |
| | | // }; |
| | | // myCharts5.setOption(options5); |
| | | // // 赋值 |
| | | // myCharts5.setOption({series: [{data: mainData.weekSnapNumList}]}); |
| | | //渲染玉米7天出库最低价格 |
| | | var myCharts6 = echarts.init(document.getElementById('snapChartsWeek')); |
| | | var options6 = { |
| | | tooltip: {trigger: 'axis', axisPointer: {lineStyle: {color: '#E0E0E0'}}}, |
| | | color: ['#FFA800'], |
| | | legend: { |
| | | orient: 'vertical', right: '0px', top: '0px', |
| | | data: ['抓拍数'], textStyle: {color: '#595959'} |
| | | data: ['出库单价'], textStyle: {color: '#595959'} |
| | | }, |
| | | grid: {top: '75px', left: '35px', right: '55px', bottom: '40px'}, |
| | | grid: {top: '75px', left: '55px', right: '55px', bottom: '40px'}, |
| | | xAxis: { |
| | | name: '日期', |
| | | nameTextStyle: {color: '#595959'}, |
| | | type: 'category', |
| | | data: mainData.weekSnapDateList, |
| | | data: mainData.weekMaizeDateList, |
| | | axisLine: {lineStyle: {color: '#E0E0E0'}, symbol: ['none', 'arrow'], symbolOffset: [0, 10]}, |
| | | axisLabel: {color: '#8c8c8c'}, |
| | | axisTick: {alignWithLabel: true} |
| | | }, |
| | | yAxis: { |
| | | name: '数量', |
| | | name: '价格(元/公斤)', |
| | | nameTextStyle: {color: '#595959'}, |
| | | type: 'value', |
| | | boundaryGap: ['0', '20%'], |
| | |
| | | minInterval: 1 |
| | | }, |
| | | series: [{ |
| | | name: '抓拍信息', type: 'bar', stack: 'one', barMaxWidth: '30px', |
| | | name: '最低单价', type: 'bar', stack: 'one', barMaxWidth: '30px', |
| | | label: {normal: {show: true, position: 'inside'}} |
| | | }] |
| | | }; |
| | | myCharts5.setOption(options5); |
| | | myCharts6.setOption(options6); |
| | | // 赋值 |
| | | myCharts5.setOption({series: [{data: mainData.weekSnapNumList}]}); |
| | | myCharts6.setOption({series: [{data: mainData.weekMaizeNumList}]}); |
| | | |
| | | /** 窗口大小改变事件 */ |
| | | window.onresize = function () { |
| | |
| | | myCharts2.resize(); |
| | | myCharts3.resize(); |
| | | myCharts4.resize(); |
| | | myCharts5.resize(); |
| | | // myCharts5.resize(); |
| | | myCharts6.resize(); |
| | | }; |
| | | |
| | | }); |