jonavila commented on issue #14293:
URL: https://github.com/apache/echarts/issues/14293#issuecomment-790918020


   I ran into this issue in 5.x and I believe it's caused by this method of 
Series.ts
   
   
   ```
   private _initSelectedMapFromData(data: List) {
           // Ignore select info in data if selectedMap exists.
           // NOTE It's only for legacy usage. edge data is not supported.
           if (this.option.selectedMap) {
               return;
           }
   
           const dataIndices: number[] = [];
           if (data.hasItemOption) {
               data.each(function (idx) {
                   const rawItem = data.getRawDataItem(idx);
                   if (typeof rawItem === 'object'
                       && (rawItem as OptionDataItemObject<unknown>).selected
                   ) {
                       dataIndices.push(idx);
                   }
               });
           }
   
           if (dataIndices.length > 0) {
               this._innerSelect(data, dataIndices);
           }
       }
       
   ```
   You can see how it fails if rawItem is null because typeof null === 'object'.
   
   Using  undefined in the value instead of null works for me as workaround.
   
   
   


----------------------------------------------------------------
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.

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