123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- import ChartLine from '../../../src/chart/tufang/ChartLine11/ChartLine11.js';
-
- let chart = new ChartLine(document.getElementsByClassName('c1')[0], {});
- window.addEventListener('resize', () => {
- chart.resize();
- });
-
-
- // let option = {
- // color: ['#c6b146','#ffffff','#94ddf3', '#18c1f1', '#ed9c01', '#d0e3ff', '#00bfff', '#008b8b', '#00fa9a', '#0000ff'],
- // title: Title.option(''),
- // bg: {
- // backgroundColor: '#101029'
- // },
- // grid: Grid.option,
- // tooltip: {
- // // dangerline: {
- // // show: true,
- // // dangerData: 8
- // // },
- // // targetline: {
- // // show: true,
- // // targetData: 12
- // // },
- // // guideline: {
- // // show: true,
- // // color: '#ccc'
- // // }
- // backgroundColor: '#ffffff',
- // opacity: 0.05
- // },
- // legend: {
- // itemHeight: 10,
- // itemWidth: 10,
- // itemAngelR: 20,
- // left:'22%',
- // top:'8%'
- // },
- // xAxis: {
- // type: "category",
- // // title: '日期',
- // nameTextStyle: {
- // fontSize: 12,
- // color: '#797979',
- // },
- // namePosition: 'end',
- // // data: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", '八月', '九月', '十月', '十一月', '十二月'],
- // data: ['2012','2013','2014','2015','2016','2017','2018','2019'],
- // boundaryGap: false,
- // // scale: true,
- // axisLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.3,
- // width: 4,
- // type: 'solid'
- // }
- // },
- // axisTick: {
- // show: false,
- // alignWithLabel: false,
- // // interval: 'auto'
- // },
- // splitLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity:0.05,
- // width: 1,
- // type: 'solid'
- // }
- // },
- // axisLabel: {
- // show: true,
- // textStyle: {
- // color: '#797979',
- // textRotation:30
- // }
- // }
- // },
- // yAxis: {
- // type: 'value',
- // title: '单位',
- // nameTextStyle: {
- // fontSize: 12,
- // color: '#797979',
- // },
- // namePosition: 'end',
- // scale: true,
- // axisLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.3,
- // width: 4,
- // type: 'solid'
- // }
- // },
- // axisTick: {
- // show: false,
- // alignWithLabel: true,
- // interval: 'auto',
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.3,
- // width: 1
- // }
- // },
- // splitLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.05,
- // width: 1,
- // type: 'solid'
- // }
- // },
-
- // axisLabel: {
- // show: true,
- // format:true,
- // textStyle: {
- // color: '#797979'
- // }
- // }
-
- // },
- // shape:{
- // label: {
- // show: false,
- // textStyle: {
- // fontSize: 12,
- // fontWeight: 'normal',
- // color: ''
- // }
- // },
-
- // lineStyle: {
- // width: 2,
- // smooth: false,
-
- // },
- // lineShadow: {
- // shadowColor: '#000000',
- // shadowOffsetX: 0,
- // shadowOffsetY: 0,
- // shadowBlur: 0
- // },
- // iconType: 'circle',
- // circleSize: 2,
- // circleFill: '#ffffff',
- // },
- // series: [
- // {
- // name: '类别一',
- // type: 'bar',
- // data: [4.1, 3.9, 3.7, 3.95, 3.3, 3.5, 2.9, 2.2],
- // }, {
- // name: '类别二',
- // type: 'bar',
- // data: [3, 3.5, 2.9, 3.1, 3, 3.2, 2.5, 3.3],
- // }
- // // {
- // // name: '目标值',
- // // type: 'bar',
- // // data: [810000, 1200000, 1600000, 2100000, 2560000, 3000000, 3400000, 3900000, 4330000, 4760000, 5340000, 5900000],
- // // }, {
- // // name: '实际值',
- // // type: 'bar',
- // // data: [610000, 1000000, 1800000, 2200000, 2400000, 2600000, 3050000, 3590000, 4220000, 4860000, 5640000, 6800000],
- // // }, {
- // // name: '同期值',
- // // type: 'bar',
-
- // // data: [510000, 800000, 1200000, 1700000, 2200000, 2500000, 2800000, 3390000, 3850000, 4660000, 5040000, 5300000],
- // // }
- // ]
- // };
-
- // let option2 = {
- // color: ['#c6b146','#ffffff','#94ddf3', '#18c1f1', '#ed9c01', '#d0e3ff', '#00bfff', '#008b8b', '#00fa9a', '#0000ff'],
- // title: Title.option(''),
- // bg: {
- // backgroundColor: '#101029'
- // },
- // grid: Grid.option,
- // tooltip: {
- // // dangerline: {
- // // show: true,
- // // dangerData: 8
- // // },
- // // targetline: {
- // // show: true,
- // // targetData: 12
- // // },
- // // guideline: {
- // // show: true,
- // // color: '#ccc'
- // // }
- // backgroundColor: '#ffffff',
- // opacity: 0.05
- // },
- // legend: {
- // itemHeight: 10,
- // itemWidth: 10,
- // itemAngelR: 20,
- // left:'22%',
- // top:'8%'
- // },
- // xAxis: {
- // type: "category",
- // // title: '日期',
- // nameTextStyle: {
- // fontSize: 12,
- // color: '#797979',
- // },
- // namePosition: 'end',
- // // data: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", '八月', '九月', '十月', '十一月', '十二月'],
- // data: ['2012','2013','2014','2015','2016','2017','2018','2019'],
- // boundaryGap: false,
- // // scale: true,
- // axisLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.3,
- // width: 4,
- // type: 'solid'
- // }
- // },
- // axisTick: {
- // show: false,
- // alignWithLabel: false,
- // // interval: 'auto'
- // },
- // splitLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity:0.05,
- // width: 1,
- // type: 'solid'
- // }
- // },
- // axisLabel: {
- // show: true,
- // textStyle: {
- // color: '#797979',
- // textRotation:30
- // }
- // }
- // },
- // yAxis: {
- // type: 'value',
- // title: '单位',
- // nameTextStyle: {
- // fontSize: 12,
- // color: '#797979',
- // },
- // namePosition: 'end',
- // scale: true,
- // axisLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.3,
- // width: 4,
- // type: 'solid'
- // }
- // },
- // axisTick: {
- // show: false,
- // alignWithLabel: true,
- // interval: 'auto',
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.3,
- // width: 1
- // }
- // },
- // splitLine: {
- // show: true,
- // lineStyle: {
- // color: '#ffffff',
- // opacity: 0.05,
- // width: 1,
- // type: 'solid'
- // }
- // },
-
- // axisLabel: {
- // show: true,
- // format:true,
- // textStyle: {
- // color: '#797979'
- // }
- // }
-
- // },
- // shape:{
- // label: {
- // show: false,
- // textStyle: {
- // fontSize: 12,
- // fontWeight: 'normal',
- // color: ''
- // }
- // },
-
- // lineStyle: {
- // width: 2,
- // smooth: false,
-
- // },
- // lineShadow: {
- // shadowColor: '#000000',
- // shadowOffsetX: 0,
- // shadowOffsetY: 0,
- // shadowBlur: 0
- // },
- // iconType: 'trigon',
- // circleSize: 10,
- // circleFill: '#ffffff',
- // },
- // series: [
- // {
- // name: '类别一',
- // type: 'bar',
- // data: [4.1, 3.9, 3.7, 3.95, 3.3, 3.5, 2.9, 2.2],
- // }, {
- // name: '类别二',
- // type: 'bar',
- // data: [3, 3.5, 2.9, 3.1, 3, 3.2, 2.5, 3.3],
- // }
- // // {
- // // name: '目标值',
- // // type: 'bar',
- // // data: [810000, 1200000, 1600000, 2100000, 2560000, 3000000, 3400000, 3900000, 4330000, 4760000, 5340000, 5900000],
- // // }, {
- // // name: '实际值',
- // // type: 'bar',
- // // data: [610000, 1000000, 1800000, 2200000, 2400000, 2600000, 3050000, 3590000, 4220000, 4860000, 5640000, 6800000],
- // // }, {
- // // name: '同期值',
- // // type: 'bar',
-
- // // data: [510000, 800000, 1200000, 1700000, 2200000, 2500000, 2800000, 3390000, 3850000, 4660000, 5040000, 5300000],
- // // }
- // ]
- // };
-
- // setTimeout(()=>{
- // chart.setOption(option)
- // },2000)
-
- // setTimeout(()=>{
- // chart.setOption(option2)
- // },4000)
|