样式更新升级
- // 系列边框颜色
- let borderColor1 = "#3EF1FE";
- let borderColor2 = "#3481CD";
- // 系列边框宽度
- let borderWidth = 2;
- // 横向图
- option.xAxis.type = 'value';
- option.yAxis.type = 'category';
- option.yAxis.data = option.xAxis.data;
- option.xAxis.data = null
- // 新加对比背景色
- option.series[1].barGap = '-100%';
- option.series[1].z = 1;
- let decal = {
- symbol: 'diamond',
- dashArrayX: [5,5],
- dashArrayY: [1, 0],
- rotation: Math.PI / 6
- }
- option.series[1].itemStyle.decal = decal;
- option.series[1].itemStyle.borderColor = borderColor2;
- option.series[0].itemStyle.borderColor = borderColor1;
- option.series[1].itemStyle.borderWidth = borderWidth;
- option.series[0].itemStyle.borderWidth = borderWidth;
- return option
复制代码
|