echarts2堆叠柱状图显示总量问题
2018-01-22 13:30
239 查看
var option = { backgroundColor: "#164885", grid: { borderColor: "transparent" }, tooltip : { show:true, trigger: 'axis', axisPointer : { // 坐标轴指示器,坐标轴触发有效 type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' }, enterable: true // 可防止闪动 }, // calculable : true, xAxis : [ { type : 'value', axisLine: { show: false }, splitLine: { show: false }, axisTick: { show: false } } ], yAxis : [ { type : 'category', axisLine: { show: false }, splitLine: { show: false }, axisTick: { show: false }, data: ndcBuildCountNameArr } ], series: [ { name:'区域', type:'bar', barWidth:20, stack: '总量', itemStyle : { normal: { barBorderColor:'rgba(1,1,1,0)', barBorderWidth:6, color:DCColor.hinge } }, data: ndcBuildCountHinge }, { name:'核心', barWidth:20, type:'bar', stack: '总量', itemStyle : { normal: { barBorderColor:'rgba(1,1,1,0)', barBorderWidth:6, color:DCColor.core } }, data: ndcBuildCountCore }, { name:'边缘', barWidth:20, type:'bar', stack: '总量', itemStyle : { normal: { barBorderColor:'rgba(1,1,1,0)', barBorderWidth:6, color:DCColor.common, label:{ show:true, position:'right', formatter: function(params) {//格式化柱状图显示label var dataValue0=0; var dataValue1=0; for(var i=0;i<ndcBuildCountNameArr.length;i++){ if(params.name==ndcBuildCountNameArr[i].value){ dataValue0 =ndcBuildCountHinge[i]; dataValue1 =ndcBuildCountCore[i]; } } return params.value+dataValue0+dataValue1; } } } }, data: addAllData3 } ] };
相关文章推荐
- MPAndroidChart项目实战(四)——柱状图实现及X轴文字不显示问题和柱状图上显示文字
- 关于JFreeChart横向柱状图如何将数值显示到柱子顶端的问题
- JFreeChart中文显示问题_柱状图
- IOS charts框架 横向柱状图显示数值问题
- echarts2中dataRange不显示的问题和加载loading的使用
- FusionCharts柱状图数字显示为1k的问题
- 多个柱状图重叠显示问题 jQuery.flot
- ListView 显示柱状图,并解决滚动时内容重复的问题
- echarts柱状折线图数据量大,柱状图不显示问题解决办法.
- FORM BUILDER 堆叠画布显示问题
- Echarts柱状图的每个柱子显示不同颜色问题
- android混淆后webview显示问题
- react中iconfont字体图标不显示问题
- ckfinder上传图片含中文,预览无法正常显示问题
- shdocvw32.dll病毒删除后桌面无法显示的问题
- arclist标签limit失效问题解决办法(无论填多少条只显示10条)
- 源代码移植的汉字显示问题
- 解决win下的文件到Ubuntu上显示乱码的问题
- 利用Picasso显示照片墙遇到的问题
- QT中文显示问题