效果
拷贝代码
- let total_name = "总计";
- let num = 0;
- let accumulateValue = [];
- option.xAxis.data.reverse().push({
- value:total_name
- });
- option.xAxis.data.reverse();
- option.series[0].data.reverse().map(item=>{
- accumulateValue.push(num);
- num += item.value;
- })
- accumulateValue.push(0);
- accumulateValue = accumulateValue.reverse();
- option.series[0].data.push({
- itemStyle : {
- opacity : 1
- },
- value:num
- });
- option.series[0].data.reverse();
- option.series[0].stack = 'Total';
- option.series= [
- {
- name: 'Placeholder',
- type: 'bar',
- stack: 'Total',
- itemStyle: {
- borderColor: 'transparent',
- color: 'transparent'
- },
- emphasis: {
- itemStyle: {
- borderColor: 'transparent',
- color: 'transparent'
- }
- },
- data: accumulateValue
-
- },
- ...option.series
- ];
- return option;
复制代码 方式1:
在Wyn管理后台的【导入】功能,导入以下Zip包,然后在仪表板设计器的左侧工具箱的【组件模板分类中】可以找到。
瀑布图.zip
(428.24 KB, 下载次数: 22)
|
|