Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

柱形图怎么实现同时展示多个柱子(对应的是多个指标),此时一个维度字段对应x轴 #4125

Closed
elephantme opened this issue Sep 7, 2022 · 0 comments

Comments

@elephantme
Copy link

elephantme commented Sep 7, 2022

现在返回数据,如下:其中salestotals都是数值型的指标,type为维度

const data = [
  {
    type: '家具家电',
    sales: 38,
    totals: 100,
  },
  {
    type: '粮油副食',
    sales: 52,
    totals: 80,
  },
];

翻了半天文档都没找到与之对应的案例,官方提到的分组柱形图,是两个维度,如type,city(执行sql都是要group by的)。但是我的需求是select 指标1,指标2...等多个指标,维度还是一个。 此时怎么实现展示多个柱子,及堆叠及百分比堆叠呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant