【发布时间】:2021-12-17 07:45:55
【问题描述】:
我正在尝试使用 ng2-charts 创建一个圆环图,该图有两个系列,显示与下面的数组类似的内容。只要数据数组中的项目数等于标签数,我就可以渲染两个系列。但我不能有一个系列,外环显示 3 个数字,内环有 6 个数字和不同的标签。其他人有这方面的经验吗?
public summaryDataSets = [
{
labels: ['parent1', 'parent2', 'parent3'],
data: [34, 50, 26]
},
{
labels: ['child1_1', 'child1_2', 'child2_1', 'child2_2', 'child3_1', 'child3_2'],
data: [14, 20, 30, 20, 10, 16]
}
]
【问题讨论】:
标签: angular chart.js ng2-charts