rettrich opened a new issue, #18411:
URL: https://github.com/apache/echarts/issues/18411

   ### 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 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 
   
https://github.com/apache/echarts/blob/66290cc5cd092720d039814735f01d3b849df280/src/chart/parallel/ParallelSeries.ts#L58
   but `ParallelSeriesDataValue` is
   
https://github.com/apache/echarts/blob/66290cc5cd092720d039814735f01d3b849df280/src/chart/parallel/ParallelSeries.ts#L46
   , where `OptionDataValue` is just defined as `number | string | undefined`,
   making the value property a 2D array, which it shouldn't be.
   
   
   ### Expected Behavior
   
   Change the type in 
   
https://github.com/apache/echarts/blob/66290cc5cd092720d039814735f01d3b849df280/src/chart/parallel/ParallelSeries.ts#L58
   
   to `value?: ParallelSeriesDataValue` (simply remove square brackets).
   
   ### Environment
   
   _No response_
   
   ### Any additional comments?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to