123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379 |
- function culturalTourism() {
- // 文化旅游
- $('.cumulat').removeClass('click');
- $('.thisMonth').addClass('click');
- var shbzTableHtml = `
- <ul class="title">
- <li style="width: 101px;">范围</li>
- <li><span>旅游总收入</span><span>(万元)</span></li>
- <li><span>旅游从业人数</span><span>(人)</span></li>
- </ul>
- <ul class="number">
- <li style="width: 100px;">当月</li>
- <li>322,450</li>
- <li>31,012</li>
- </ul>
- `
- $(".wsylTable").empty().html(shbzTableHtml)
- var chartDom = document.getElementById('whlyEchar');
- var myChart = echarts.init(chartDom);
- var alldata = [[4256415, 225424], [31762696, 1724264]];
- var option;
- var data = alldata[0]
- option = {
- grid: {
- // 网格线配置
- show: true,
- lineStyle: {
- color: ["#e9e9e9"],
- width: 1,
- type: "solid",
- },
- left: 100
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- },
- backgroundColor: "rgb(0 0 0 / 40%)",
- borderColor: 'none',
- formatter: function (params) {
- let total = params[0].value + params[1].value;
- var html = "";
- html = `<div
- style="font-size: 14px;font-family: Microsoft YaHei;color: #FFFFFF;width: 206px;border-radius: 10px;box-sizing: border-box;position: relative;">
- <div>`+ params[0].axisValue + `:</div>
- <div>`+ total.toLocaleString() + `人次<span style="margin-left:20px;"></span></div>
- <div style="width: 272px;height: 1px;background:rgb(255 255 255 / 32%);margin: 10px 0;"></div>
- <div><span
- style="width: 11px;height: 11px;background: `+ params[0].color + `;border-radius: 6px;display:inline-block;margin-right:5px;"></span><span>` + params[0].seriesName + `:
- `+ params[0].value.toLocaleString() + `人次</span>
- </div>
- <div><span
- style="width: 11px;height: 11px;background: `+ params[1].color + `;border-radius: 6px;display:inline-block;margin-right:5px;"></span><span>` + params[1].seriesName + `:
- `+ params[1].value.toLocaleString() + `人次</span><span style="margin-left:20px;"></span>
- </div>
- </div>`
- return html;
- },
- confine: true
- },
- xAxis: {
- type: 'category',
- data: ['接待海内外游客', '过夜游客'],
- axisLabel: {
- show: true,
- textStyle: {
- color: '#333', //更改坐标轴文字颜色
- fontSize: 14 //更改坐标轴文字大小
- }
- },
- isTick: {
- show: true //坐标轴刻度线
- },
- axisLine: { //轴线
- show: true
- },
- splitLine: { //网格线
- show: true
- },
- },
- yAxis: {
- type: 'value',
- min: 0,
- max: 5000000,
- interval: 1000000,
- axisLabel: {
- formatter: '{value}人次'
- },
- axisTick: {
- show: true //坐标轴刻度线
- },
- axisLine: { //轴线
- show: true
- },
- splitLine: { //网格线
- show: true
- }
- },
- series: [
- {
- name: '海外游客',
- barWidth: 100,
- data: [0, 0],
- type: 'bar',
- itemStyle: {
- color: '#A7D0FD'
- },
- },
- //4256415 225424 322450 31012
- //31762696 1724264 2370899 286838
- {
- name: '海内游客',
- barWidth: 100,
- data: data,
- type: 'bar',
- barGap: '-100%',//移动第二个柱子的位置实现重叠
- z: '-1',//改变这根柱子的层级使这根柱子在下面,
- itemStyle: {
- color: '#509EF3'
- }
- }
- ]
- };
- option && myChart.setOption(option);
- // 文化旅游
- $('.thisMonth').click(function () {
- $('.cumulat').removeClass('click');
- $('.thisMonth').addClass('click');
- var shbzTableHtml = `
- <ul class="title">
- <li style="width: 101px;">范围</li>
- <li><span>旅游总收入</span><span>(万元)</span></li>
- <li><span>旅游从业人数</span><span>(人)</span></li>
- </ul>
- <ul class="number">
- <li style="width: 100px;">当月</li>
- <li>322,450</li>
- <li>31,012</li>
- </ul>
- `
- $(".wsylTable").empty().html(shbzTableHtml)
- var option;
- var data = alldata[0]
- option = {
- grid: {
- // 网格线配置
- show: true,
- lineStyle: {
- color: ["#e9e9e9"],
- width: 1,
- type: "solid",
- },
- left: 100
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- },
- backgroundColor: "rgb(0 0 0 / 40%)",
- borderColor: 'none',
- formatter: function (params) {
- let total = params[0].value + params[1].value;
- var html = "";
- html = `<div
- style="font-size: 14px;font-family: Microsoft YaHei;color: #FFFFFF;width: 206px;border-radius: 10px;box-sizing: border-box;position: relative;">
- <div>`+ params[0].axisValue + `:</div>
- <div>`+ total.toLocaleString() + `人次<span style="margin-left:20px;"></span></div>
- <div style="width: 272px;height: 1px;background:rgb(255 255 255 / 32%);margin: 10px 0;"></div>
- <div><span
- style="width: 11px;height: 11px;background: `+ params[0].color + `;border-radius: 6px;display:inline-block;margin-right:5px;"></span><span>` + params[0].seriesName + `:
- `+ params[0].value.toLocaleString() + `人次</span>
- </div>
- <div><span
- style="width: 11px;height: 11px;background: `+ params[1].color + `;border-radius: 6px;display:inline-block;margin-right:5px;"></span><span>` + params[1].seriesName + `:
- `+ params[1].value.toLocaleString() + `人次</span><span style="margin-left:20px;"></span>
- </div>
- </div>`
- return html;
- },
- confine: true
- },
- xAxis: {
- type: 'category',
- data: ['接待海内外游客', '过夜游客'],
- axisLabel: {
- show: true,
- textStyle: {
- color: '#333', //更改坐标轴文字颜色
- fontSize: 14 //更改坐标轴文字大小
- }
- },
- isTick: {
- show: true //坐标轴刻度线
- },
- axisLine: { //轴线
- show: true
- },
- splitLine: { //网格线
- show: true
- },
- },
- yAxis: {
- type: 'value',
- min: 0,
- max: 5000000,
- interval: 1000000,
- axisLabel: {
- formatter: '{value}(人次)'
- },
- axisTick: {
- show: true //坐标轴刻度线
- },
- axisLine: { //轴线
- show: true
- },
- splitLine: { //网格线
- show: true
- }
- },
- series: [
- {
- name: '海外游客',
- barWidth: 100,
- data: [0, 0],
- type: 'bar',
- itemStyle: {
- color: '#A7D0FD'
- }
- },
- //4256415 225424 322450 31012
- //31762696 1724264 2370899 286838
- {
- name: '海内游客',
- barWidth: 100,
- data: data,
- type: 'bar',
- barGap: '-100%',//移动第二个柱子的位置实现重叠
- z: '-1',//改变这根柱子的层级使这根柱子在下面,
- itemStyle: {
- color: '#509EF3'
- }
- }
- ]
- };
- myChart.clear();
- option && myChart.setOption(option);
- })
- $('.cumulat').click(function () {
- $('.cumulat').addClass('click');
- $('.thisMonth').removeClass('click');
- var shbzTableHtml = `
- <ul class="title">
- <li style="width: 101px;">范围</li>
- <li><span>旅游总收入</span><span>(万元)</span></li>
- <li><span>旅游从业人数</span><span>(人)</span></li>
- </ul>
- <ul class="number">
- <li style="width: 100px;">累计</li>
- <li>2,370,899</li>
- <li>286,838</li>
- </ul>
- `
- $(".wsylTable").empty().html(shbzTableHtml)
- var option;
- var data = alldata[1]
- option = {
- grid: {
- // 网格线配置
- show: true,
- lineStyle: {
- color: ["#e9e9e9"],
- width: 1,
- type: "solid",
- },
- left: 110
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'shadow'
- },
- backgroundColor: "rgb(0 0 0 / 40%)",
- borderColor: 'none',
- formatter: function (params) {
- let total = params[0].value + params[1].value;
-
- var html = "";
- html = `<div
- style="font-size: 14px;font-family: Microsoft YaHei;color: #FFFFFF;width: 206px;border-radius: 10px;box-sizing: border-box;position: relative;">
- <div>`+ params[0].axisValue + `:</div>
- <div>`+ total.toLocaleString() + `人次<span style="margin-left:20px;"></span></div>
- <div style="width: 272px;height: 1px;background:rgb(255 255 255 / 32%);margin: 10px 0;"></div>
- <div><span
- style="width: 11px;height: 11px;background: `+ params[0].color + `;border-radius: 6px;display:inline-block;margin-right:5px;"></span><span>` + params[0].seriesName + `:
- `+ params[0].value.toLocaleString() + `人次</span>
- </div>
- <div><span
- style="width: 11px;height: 11px;background: `+ params[1].color + `;border-radius: 6px;display:inline-block;margin-right:5px;"></span><span>` + params[1].seriesName + `:
- `+ params[1].value.toLocaleString() + `人次</span><span style="margin-left:20px;"></span>
- </div>
- </div>`
- return html;
- },
- confine: true
- },
- xAxis: {
- type: 'category',
- data: ['接待海内外游客', '过夜游客'],
- axisLabel: {
- show: true,
- textStyle: {
- color: '#333', //更改坐标轴文字颜色
- fontSize: 14 //更改坐标轴文字大小
- }
- },
- isTick: {
- show: true //坐标轴刻度线
- },
- axisLine: { //轴线
- show: true
- },
- splitLine: { //网格线
- show: true
- },
- },
- yAxis: {
- type: 'value',
- min: 0,
- max: 35000000,
- interval: 10000000,
- axisLabel: {
- formatter: '{value}(人次)'
- },
- axisTick: {
- show: true //坐标轴刻度线
- },
- axisLine: { //轴线
- show: true
- },
- splitLine: { //网格线
- show: true
- }
- },
- series: [
- {
- name: '海外游客',
- barWidth: 100,
- data: [0, 0],
- type: 'bar',
- itemStyle: {
- color: '#A7D0FD'
- }
- },
- //4256415 225424 322450 31012
- //31762696 1724264 2370899 286838
- {
- name: '海内游客',
- barWidth: 100,
- data: data,
- type: 'bar',
- barGap: '-100%',//移动第二个柱子的位置实现重叠
- z: '-1',//改变这根柱子的层级使这根柱子在下面,
- itemStyle: {
- color: '#509EF3'
- }
- }
- ]
- };
- myChart.clear();
- option && myChart.setOption(option);
- })
- }
|