【发布时间】:2020-07-27 05:54:07
【问题描述】:
我想把图例放在图形下面(这很简单),但是代码根本不起作用,给我以下错误:
The types of 'options.legend.position' are incompatible between these types.
Type 'string' is not assignable to type '"bottom" | "left" | "right" | "top" | "chartArea" | undefined'.
更糟糕的是,我在 CodeSandBox 中得到了相同的代码,没有任何区别,而且运行良好...这是它的链接:https://codesandbox.io/s/spring-hill-3nme9?file=/src/components/Scatter.tsx
有什么帮助吗?谢谢!
【问题讨论】:
标签: typescript graph charts legend