export let colors = [ '#43FD87', '#F6EE55', '#1296DB', '#DC24F6', '#F64D3B', '#FF9F7F', '#FB7293', '#E062AE', '#E690D1', '#E7BCF3', '#9D96F5', '#8378EA', '#96BFFF' ] export let resultColor = [ { name: '白名单', color: '#14E75F' }, { name: '江苏电台', color: '#8A8A8A' }, { name: '浙江电台', color: '#8A8A8A' }, { name: '误报', color: '#DC24F6' }, { name: '非法电台', color: '#E4DA11' } ] export let originalColor = [ { id:1,name: '合法电台', color: '#43FD87' }, { id:2,name: '区域非法', color: '#F6EE55' }, { id:3,name: '时间非法', color: '#1296DB' }, { id:4,name: '频率非法', color: '#DC24F6' }, { id:5,name: '内容非法', color: '#F64D3B' } ] let xAxisLine = { axisLabel: { interval: 0, formatter: function (value) { var ret = '' //拼接加\n返回的类目项 var maxLength = 2 //每项显示文字个数 var valLength = value.length //X轴类目项的文字个数 var rowN = Math.ceil(valLength / maxLength) //类目项需要换行的行数 if (rowN > 1) { //如果类目项的文字大于3, for (var i = 0; i < rowN; i++) { var temp = '' //每次截取的字符串 var start = i * maxLength //开始截取的位置 var end = start + maxLength //结束截取的位置 //这里也可以加一个是否是最后一行的判断,但是不加也没有影响, temp = value.substring(start, end) + '\n' ret += temp //凭借最终的字符串 } return ret } else { return value } } } } let tooltip = { axisPointer: { type: 'shadow', shadowStyle: { color: 'rgba(222,222,227,0.3)' } }, textStyle: { color: '#5C5C5C' }, padding: 10, backgroundColor: 'rgba(255,255,255,0.8)', extraCssText: 'box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);' } let yAxis = { minInterval: '1', axisLine: { show: false, lineStyle: { color: 'rgba(255,255,255,0.5)' } }, axisLabel: { interval: 0, fontSize: 10 }, splitLine: { show: false } } let xAxis = { axisLine: { show: false, lineStyle: { color: 'rgba(255,255,255,0.5)' } }, nameTextStyle: { fontSize: 10 }, axisLabel: { interval: 0, fontSize: 10 } } let stepA = [ { offset: 0, color: '#02F7CC' }, { offset: 0.5, color: '#15BFCD' }, { offset: 1, color: '#2987CF' } ] let stepB = [ { offset: 0, color: '#f27121' }, { offset: 0.7, color: '#e94057' }, { offset: 1, color: '#8a2387' } ] let stepC = [ { offset: 0, color: '#00bf8f' }, { offset: 1, color: '#001510' } ] let stepD = [ { offset: 0, color: '#43c6ac' }, { offset: 1, color: '#191654' } ] let stepE = [ { offset: 0, color: '#141e30' }, { offset: 1, color: '#243b55' } ] let stepF = [ { offset: 0, color: '#6a9113' }, { offset: 1, color: '#141517' } ] let stepG = [ { offset: 0, color: '#02F7CC' }, { offset: 0.5, color: '#15BFCD' }, { offset: 1, color: '#2987CF' } ] export let chart_word = { tooltip: tooltip, grid: { left: 10, top: 10, right: 10, bottom: 10 }, } export let lineExtend = { legend: { show: false }, grid: { left: 10, top: 10, right: 20, bottom: 0 }, yAxis: { axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,0.5)' } }, splitLine: { show: false } }, xAxis: { axisLine: { show: true, lineStyle: { color: 'rgba(255,255,255,0.5)' } }, nameTextStyle: { fontSize: 10 }, axisLabel: { interval: 0, fontSize: 10 } }, series: { smooth: false, lineStyle: { normal: { type: 'solid', color: 'rgb(39,140,206)' } }, itemStyle: { normal: { color: '#3AA1FF' } }, areaStyle: { normal: { color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: 'rgba(39,140,206,1)' // 0% 处的颜色 }, { offset: 0.7, color: 'rgba(18,198,205,0.7)' // 50% 处的颜色 }, { offset: 1, color: 'rgba(1,249,204,0.4)' // 100% 处的颜色 } ], globalCoord: false // 缺省为 false } } } } } export let barG = { tooltip: tooltip, grid: { left: 10, top: 20, right: 10, bottom: 0 }, yAxis: { minInterval: '1' //show: false }, xAxis: { show: true, axisLine: { lineStyle: { //color: "#fff" } }, nameTextStyle: { fontSize: 10 }, axisLabel: { interval: 0, fontSize: 10 } }, series: { barWidth: '60%', label: { normal: { show: true, position: 'top', color: '#FFF' } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10, color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: stepG, global: false // 缺省为 false } } } } export let chart_a = { tooltip: tooltip, grid: { left: 10, top: 10, right: 10, bottom: 40 }, yAxis: yAxis, xAxis: { show: true, axisLine: { lineStyle: { color: "#fff" } }, nameTextStyle: { fontSize: 8 }, axisLabel: { rotate:45, interval: 0, fontSize: 8 } }, series: { barWidth: '60%', label: { normal: { show: true, position: 'top', color: '#FFF' } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10, color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: stepG, global: false // 缺省为 false } } } } export let chart_b = { tooltip: tooltip, grid: { left: 10, top: 10, right: 10, bottom: 40 }, yAxis: yAxis, xAxis: { show: true, axisLine: { lineStyle: { color: "#fff" } }, nameTextStyle: { fontSize: 8 }, axisLabel: { rotate:45, interval: 0, fontSize: 8 } }, series: { barWidth: '60%', label: { normal: { show: true, position: 'top', color: '#FFF' } }, areaStyle:{}, itemStyle: { shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10, color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: stepB, global: false // 缺省为 false } } } } export let HeatMap = { tooltip: tooltip, grid: { left: 4, top: 0, right: 10, bottom: 0 }, yAxis: { minInterval: '1', axisLine: { show: false, lineStyle: { //color: 'rgba(255,255,255,0.5)' } }, axisLabel: { interval: 0, fontSize: 8 }, splitLine: { show: false } }, xAxis: { position:'top', axisLine: { show: false, lineStyle: { //color: 'rgba(255,255,255,0.5)' } }, nameTextStyle: { fontSize: 8 }, axisLabel: { show:false, interval: 0, formatter: function (value) { return value.substring(0, 3) + '\n' + value.substring(3) } } }, series: { label: { normal: { show: true, //color: '#FFF', fontSize: 10 } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 2 } } } export let barC = { tooltip: tooltip, grid: { left: 10, top: 20, right: 20, bottom: 0 }, yAxis: yAxis, xAxis: xAxis, series: { barWidth: '60%', label: { normal: { show: true, position: 'top', color: '#FFF' } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10, color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: stepC, global: false // 缺省为 false } } } } export let barD = { tooltip: tooltip, grid: { left: 10, top: 20, right: 20, bottom: 0 }, yAxis: yAxis, xAxis: xAxis, series: { barWidth: '60%', label: { normal: { show: true, position: 'top', color: '#FFF' } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10, color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: stepD, global: false // 缺省为 false } } } } export let barE = { tooltip: tooltip, grid: { left: 10, top: 20, right: 20, bottom: 0 }, yAxis: yAxis, xAxis: xAxis, series: { barWidth: '60%', label: { normal: { show: true, position: 'top', color: '#FFF' } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10, color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: stepE, global: false // 缺省为 false } } } } export let barF = { tooltip: tooltip, grid: { left: 10, top: 20, right: 20, bottom: 0 }, yAxis: yAxis, xAxis: xAxis, series: { barWidth: '60%', large: true, label: { normal: { show: true, position: 'top', color: '#FFF' } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10, color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: stepF, global: false // 缺省为 false } } } } export let barH = { tooltip: { axisPointer: { type: 'shadow', shadowStyle: { color: 'rgba(222,222,227,0.3)' } }, textStyle: { color: '#5C5C5C' }, padding: 10, backgroundColor: 'rgba(255,255,255,0.8)', extraCssText: 'box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);' }, grid: { left: 20, top: 40, right: 20, bottom: 40 }, yAxis: { minInterval: '1' //show: false }, xAxis: { show: true, axisLine: { lineStyle: { //color: "#fff" } }, nameTextStyle: { fontSize: 10 }, axisLabel: { interval: 0, fontSize: 10 } }, series: { barGap: '100%', label: { normal: { show: true, position: 'top' //color: '#FFF' } }, itemStyle: { barBorderRadius: [5, 5, 0, 0], shadowColor: 'rgba(0, 0, 0, 0.5)', shadowBlur: 10 } } }