//定义一套绿色的皮肤
var theme = {// 默认色板color: [
'#408829', '#68a54a', '#a9cba2', '#86b379',
'#397b29', '#8abb6f', '#759c6a', '#bfd3b7'
],// 图表标题title: {itemGap: 8,textStyle: {fontWeight: 'normal',color: '#408829'}},// 值域dataRange: {color: ['#1f610a', '#97b58d']},// 工具箱toolbox: {color: ['#408829', '#408829', '#408829', '#408829']},// 提示框tooltip: {backgroundColor: 'rgba(0,0,0,0.5)',axisPointer: { // 坐标轴指示器,坐标轴触发有效type: 'line', // 默认为直线,可选为:'line' | 'shadow'lineStyle: { // 直线指示器样式设置color: '#408829',type: 'dashed'},crossStyle: {color: '#408829'},shadowStyle: { // 阴影指示器样式设置color: 'rgba(200,200,200,0.3)'}}},// 区域缩放控制器dataZoom: {dataBackgroundColor: '#eee', // 数据背景颜色fillerColor: 'rgba(64,136,41,0.2)', // 填充颜色handleColor: '#408829' // 手柄颜色},grid: {borderWidth: 0},// 类目轴categoryAxis: {axisLine: { // 坐标轴线lineStyle: { // 属性lineStyle控制线条样式color: '#408829'}},splitLine: { // 分隔线lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式color: ['#eee']}}},// 数值型坐标轴默认参数valueAxis: {axisLine: { // 坐标轴线lineStyle: { // 属性lineStyle控制线条样式color: '#408829'}},splitArea: {show: true,areaStyle: {color: ['rgba(250,250,250,0.1)', 'rgba(200,200,200,0.1)']}},splitLine: { // 分隔线lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式color: ['#eee']}}},timeline: {lineStyle: {color: '#408829'},controlStyle: {normal: { color: '#408829' },emphasis: { color: '#408829' }}},// K线图默认参数k: {itemStyle: {normal: {color: '#68a54a', // 阳线填充颜色color0: '#a9cba2', // 阴线填充颜色lineStyle: {width: 1,color: '#408829', // 阳线边框颜色color0: '#86b379' // 阴线边框颜色}}}},map: {itemStyle: {normal: {areaStyle: {color: '#ddd'},label: {textStyle: {color: '#c12e34'}}},emphasis: { // 也是选中样式areaStyle: {color: '#99d2dd'},label: {textStyle: {color: '#c12e34'}}}}},force: {itemStyle: {normal: {linkStyle: {strokeColor: '#408829'}}}},chord: {padding: 4,itemStyle: {normal: {lineStyle: {width: 1,color: 'rgba(128, 128, 128, 0.5)'},chordStyle: {lineStyle: {width: 1,color: 'rgba(128, 128, 128, 0.5)'}}},emphasis: {lineStyle: {width: 1,color: 'rgba(128, 128, 128, 0.5)'},chordStyle: {lineStyle: {width: 1,color: 'rgba(128, 128, 128, 0.5)'}}}}},gauge: {startAngle: 225,endAngle: -45,axisLine: { // 坐标轴线show: true, // 默认显示,属性show控制显示与否lineStyle: { // 属性lineStyle控制线条样式color: [[0.2, '#86b379'], [0.8, '#68a54a'], [1, '#408829']],width: 8}},axisTick: { // 坐标轴小标记splitNumber: 10, // 每份split细分多少段length: 12, // 属性length控制线长lineStyle: { // 属性lineStyle控制线条样式color: 'auto'}},axisLabel: { // 坐标轴文本标签,详见axis.axisLabeltextStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLEcolor: 'auto'}},splitLine: { // 分隔线length: 18, // 属性length控制线长lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式color: 'auto'}},pointer: {length: '90%',color: 'auto'},title: {textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLEcolor: '#333'}},detail: {textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLEcolor: 'auto'}}},textStyle: {fontFamily: '微软雅黑, Arial, Verdana, sans-serif'}
};
详细解决方案
ECharts图表的皮肤是什么?如何给图表换主题(皮肤)Theme?
热度:12 发布时间:2024-01-18 18:12:12.0
相关解决方案
- 小弟我的站点加了风格(Theme),有的页面小弟我不想加,怎么处理
- 一个小疑点 theme 失效
- Rails的web-app-theme 证验消息显示
- 替WebWork simple theme 添加客户端校验功能
- 超强JavaScript编辑器webstorm正题(theme)
- echarts 怎么动态的添加折线图中的series
- : No resource found that matches the given name 'android:Theme.Holo.Light'该如何处理
- Android安卓 style(式样) 主题(Theme) 设置
- android的小疑点:You need to use a Theme.AppCompat theme
- Android作派与主题(style and theme)
- android 自带主题式样(theme )
- error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'
- 给树莓派IIraspberrypi装配emacs+ecb+cedet+session+color-theme+cscope+linum
- 【Android】系统自带的正题与样式(theme and style)
- Android Styles & Themes(上)——Theme
- 系统自带式样Android:theme
- Android 式样和主题,style&theme
- Android 系统自带式样Android:theme
- android中自带的正题(theme)的集
- android 自带的正题 theme 的使用
- Echarts,饼图中如何对数据进行判断,或者说如何去掉数据为零的lableline
- echarts.init报错
- Echarts.js的简单方法归类
- echarts legend太多换行显示及legend每个标签文字过长分两行显示的间距调整问题
- 六月工作总结——Echarts
- Echarts-折线图-多条线
- 安卓开发之应用运行报错:You need to use a Theme
- echarts 动态数据改变时, 原数据依然存在图表上,没有刷新
- echarts x 轴文本旋转
- ECharts 定制 label 样式单独加颜色