Chart图表 dodge is not support linear attribute
组件如下:
data值如下:
`[{label: "2020-02-20", gsv: 750477688, type: "AAAA", value: 8}
{label: "2020-02-20", gsv: 750477688, type: "BBBBB", value: 144}
{label: "2020-02-20", gsv: 750477688, type: "CCCC", value: 128}
{label: "2020-02-20", gsv: 750477688, type: "DDDD", value: 256}
{label: "2020-02-20", gsv: 750477688, type: "EEEE", value: 200}
{label: "2020-02-21", gsv: 244500664, type: "AAAA", value: 48}
{label: "2020-02-21", gsv: 244500664, type: "BBBBB", value: 160}
{label: "2020-02-21", gsv: 244500664, type: "DDDD", value: 128}
{label: "2020-02-21", gsv: 244500664, type: "EEEE", value: 144}
{label: "2020-02-22", gsv: 49292848, type: "AAAA", value: 40}
{label: "2020-02-22", gsv: 49292848, type: "BBBBB", value: 80}
{label: "2020-02-22", gsv: 49292848, type: "DDDD", value: 64}
{label: "2020-02-22", gsv: 49292848, type: "EEEE", value: 88}
{label: "2020-02-23", gsv: 187360368, type: "AAAA", value: 56}
{label: "2020-02-23", gsv: 187360368, type: "BBBBB", value: 192}
{label: "2020-02-23", gsv: 187360368, type: "EEEE", value: 128}
{label: "2020-02-24", gsv: 225904744, type: "AAAA", value: 72}
{label: "2020-02-24", gsv: 225904744, type: "BBBBB", value: 336}
{label: "2020-02-24", gsv: 225904744, type: "DDDD", value: 64}
{label: "2020-02-24", gsv: 225904744, type: "EEEE", value: 96}
{label: "2020-02-25", gsv: 523754935, type: "AAAA", value: 60}
{label: "2020-02-25", gsv: 523754935, type: "BBBBB", value: 221}]`
错误如标题:
dodge is not support linear attribute, please use category attribute!
期望:
目前尝试了去除adjust属性之后,图表能正常显示,但会变成stack的形式:
更新,目前尝试把label 中的值,不是日期,改成一个其它的字符串,就符合预期了,可以使用dodge
更新通用解决方案:
https://www.jianshu.com/p/6a0...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论