热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

StackedBarinng2-charts

如何解决《StackedBarinng2-charts》经验,为你挑选了1个好方法。

I have gone through the documents of ng2-charts but I couldn't find anything like Stacked Bar. Is there is any other way to achieve Stacked Bar chart in ng2-charts? Please help me out



1> Aviad P...:

这是绝对受支持的,在文档中有chart.js 记录。您只需要使用对象stack上的属性来定义将哪些数据集堆叠在一起datasets

public barChartData: ChartDataSets[] = [
  { data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A', stack: 'a' },
  { data: [28, 48, 40, 19, 86, 27, 90], label: 'Series B', stack: 'a' }
];

例如,请参见此堆叠闪电战。


推荐阅读
author-avatar
wjb201212
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有