import { rgba } from '@topology/core'; import * as ec from 'echarts'; export default [ { elementRendered: false, name: '折线图', icon: 'icon-line-chart', data: { text: '', rect: { width: 300, height: 200 }, name: 'echarts', data: { echarts: { option: { grid: { top: '6%', left: '4%', right: '3%', bottom: '3%', containLabel: true }, legend: {}, tooltip: { trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' } }, xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [{ name: '统计数据', data: [820, 932, 901, 934, 1290, 1330, 1320], type: 'line' }] } } } } }, { name: '柱状图', icon: 'icon-bar-chart', data: { text: '', rect: { width: 300, height: 200 }, name: 'echarts', data: { echarts: { option: { color: ['#3398DB'], tooltip: { trigger: 'axis', axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' } }, grid: { top: '6%', left: '4%', right: '3%', bottom: '3%', containLabel: true }, xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], axisTick: { alignWithLabel: true } }, yAxis: { type: 'value' }, series: [ { name: '直接访问', type: 'bar', barWidth: '60%', data: [10, 52, 200, 334, 390, 330, 220] } ] } } } } }, // { // name: '饼图', // icon: 'icon-pie-chart', // data: { // text: '', // rect: { // width: 300, // height: 200 // }, // name: 'echarts', // data: { // echarts: { // option: { // tooltip: { // trigger: 'item', // formatter: '{a} <br/>{b}: {c} ({d}%)' // }, // legend: { // orient: 'vertical', // x: 'left', // data: ['空调', '照明', '动力', '特殊'] // }, // series: [ // { // name: '访问来源', // type: 'pie', // radius: ['50%', '70%'], // center: ["60%", "50%"], // avoidLabelOverlap: false, // label: { // normal: { // show: false, // position: 'center' // }, // emphasis: { // show: true, // textStyle: { // fontSize: '30', // fontWeight: 'bold' // } // } // }, // labelLine: { // normal: { // show: false // } // }, // data: [ // { value: 1548, name: '空调' }, // { value: 310, name: '照明' }, // { value: 234, name: '动力' }, // { value: 135, name: '特殊' } // ] // } // ] // } // } // } // } // }, { name: '水量图', icon: 'icontopologyfont icon-topology-filling', data: { text: '', rect: { width: 100, height: 100 }, name: 'echarts', data: { echarts: { option: { // backgroundColor:'#f1f1f1', grid: { top: 0, bottom: 0, left: 0, right: 0 }, title: { top: '47%', left: 'center', text: '50%', textStyle: { color: '#fff', fontStyle: 'normal', fontWeight: 'normal', fontSize: 24 } }, series: [{ type: 'liquidFill', shape: 'rect', itemStyle: { opacity:0.8,//波浪的透明度 shadowBlur: 10,//波浪的阴影范围 shadowColor:'#31b9ff'//阴影颜色 }, radius:'100%', //水波 color: ['rgba(0, 100, 219, 0.6)'], data: [{ value: 0.5, }], // background: '#000', center: ['50%', '50%'], backgroundStyle: { color: 'transparent' }, label: { normal: { formatter: '', textStyle: { fontSize: 12 } } }, outline: { itemStyle: { borderColor: 'transparent', borderWidth: 0 }, borderDistance: 0 } }, ] } } } } }, ]