You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See minimal reproduction example.
The JS code of course still works, but the typescript compiler complains about wrong types.
Current Behavior
The typescript compiler shows an error when creating a ParallelSeriesOption object like shown in the minimal reproduction example. This is because the ParallelSeriesOptionDataItem type is declared wrongly.
The documentation (https://echarts.apache.org/en/option.html#series-parallel.data) states, that the data property of a ParallelSeriesOption is an array, where the elements of the array are either arrays containing the data to be displayed, or objects with a property value containing the data to be displayed, e.g.: [ [4, 33, 7, 29, 0.33, 16, 6, 'excellent'], { // Data item can also be an Object, so that perticular settings of its line can be set here. value: [5, 42, 24, 44, 0.76, 40, 16, 'excellent'] lineStyle: {...}, } ... ]
The problem is that the type is declared like this
Version
5.4.1
Link to Minimal Reproduction
https://codesandbox.io/s/nostalgic-feather-21wlum?file=/src/index.ts
Steps to Reproduce
See minimal reproduction example.
The JS code of course still works, but the typescript compiler complains about wrong types.
Current Behavior
The typescript compiler shows an error when creating a
ParallelSeriesOption
object like shown in the minimal reproduction example. This is because theParallelSeriesOptionDataItem
type is declared wrongly.The documentation (https://echarts.apache.org/en/option.html#series-parallel.data) states, that the data property of a
ParallelSeriesOption
is an array, where the elements of the array are either arrays containing the data to be displayed, or objects with a property value containing the data to be displayed, e.g.:[
[4, 33, 7, 29, 0.33, 16, 6, 'excellent'],
{ // Data item can also be an Object, so that perticular settings of its line can be set here.
value: [5, 42, 24, 44, 0.76, 40, 16, 'excellent']
lineStyle: {...},
}
...
]
The problem is that the type is declared like this
echarts/src/chart/parallel/ParallelSeries.ts
Line 58 in 66290cc
but
ParallelSeriesDataValue
isecharts/src/chart/parallel/ParallelSeries.ts
Line 46 in 66290cc
, where
OptionDataValue
is just defined asnumber | string | undefined
,making the value property a 2D array, which it shouldn't be.
Expected Behavior
Change the type in
echarts/src/chart/parallel/ParallelSeries.ts
Line 58 in 66290cc
to
value?: ParallelSeriesDataValue
(simply remove square brackets).Environment
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: