"echarts"' 没有名为 'EChartOption' 的导出成员。您是指 'EChartsOption' 吗?
"echarts"' has no exported member named 'EChartOption'. Did you mean 'EChartsOption' instead?
我正在使用 Angular 9 以及 "ngx-echarts": "5.2.2"
和 "echarts": "5.0.0"
在为图例设置 icon: 'circle'
时接受一切正常。它说下面的东西。
Type '{ icon: string; top: string; left: string; orient: "vertical";
}' is not assignable to type 'LegendOption | ScrollableLegendOption |
(LegendOption | ScrollableLegendOption)[]'.
根据 ngx-echarts 中的示例,我无法使用 import { EChartOption } from 'echarts'
;
我检查过图标在EchartOption而不是Echarts
Option
中可用
有什么我遗漏的吗?
安装 @types/echarts 后,我的代码可以正常工作并显示带圆圈图标的图例,但出现随机错误,无法在 echarts 中找到 EchartOption(我的 angular 没有处理这个问题 运行 应用忽略此错误)
现在我使用 import { EChartsOption } from 'echarts';
并删除了 @types/echarts 库。我暂时无法更改图例图标:(
有帮助吗?
谢谢,
贾耶什
当你使用 echarts 5 时,你不能安装@types/echarts,因为 echarts 5 现在是用 typescript 编写的:即 echarts 包已经包含了这个版本的正确类型。
echarts 4 和 echarts5 之间有很多变化——其中之一是 EchartOption 现在称为 EchartsOption(带有复数“s”)
我正在使用 Angular 9 以及 "ngx-echarts": "5.2.2"
和 "echarts": "5.0.0"
在为图例设置 icon: 'circle'
时接受一切正常。它说下面的东西。
Type '{ icon: string; top: string; left: string; orient: "vertical"; }' is not assignable to type 'LegendOption | ScrollableLegendOption | (LegendOption | ScrollableLegendOption)[]'.
根据 ngx-echarts 中的示例,我无法使用 import { EChartOption } from 'echarts'
;
我检查过图标在EchartOption而不是Echarts
Option
有什么我遗漏的吗?
安装 @types/echarts 后,我的代码可以正常工作并显示带圆圈图标的图例,但出现随机错误,无法在 echarts 中找到 EchartOption(我的 angular 没有处理这个问题 运行 应用忽略此错误)
现在我使用 import { EChartsOption } from 'echarts';
并删除了 @types/echarts 库。我暂时无法更改图例图标:(
有帮助吗?
谢谢, 贾耶什
当你使用 echarts 5 时,你不能安装@types/echarts,因为 echarts 5 现在是用 typescript 编写的:即 echarts 包已经包含了这个版本的正确类型。
echarts 4 和 echarts5 之间有很多变化——其中之一是 EchartOption 现在称为 EchartsOption(带有复数“s”)