echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] Missed type property for Typescript on EChartsOption

Open BulatSa opened this issue 1 year ago • 1 comments

Version

5.5.1

Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/fervent-euclid-kkws7t?file=%2Fsrc%2Findex.ts%3A3%2C23

Steps to Reproduce

  1. Use base example
  2. Use property option.xAxis.data in option: EChartsOption with Typescript

Current Behavior

I have error for use property data in option: EChartsOption Property 'data' does not exist on type 'XAXisOption | XAXisOption[]'.

Expected Behavior

Types for EChartsOption correct with all options.

BulatSa avatar Oct 07 '24 13:10 BulatSa

I encountered the same problem,and can import EChartsOption like this

import type * as echarts from 'echarts'

export type EChartsOption = echarts.EChartsOption

Fate-ui avatar Oct 14 '24 05:10 Fate-ui

I got it working with this skill.

ffxixslh avatar Oct 20 '24 20:10 ffxixslh