You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/12/06 08:30:59 UTC

[GitHub] [echarts] echarts-bot[bot] commented on issue #16175: [Bug] dataIndex

echarts-bot[bot] commented on issue #16175:
URL: https://github.com/apache/echarts/issues/16175#issuecomment-986547996


   @suzhenghui-sky It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **BODY**
   
   ### Version
   
   5.2.0
   
   ### Link to minimal reproduction
   
   _No response_
   
   ### Steps To Reproduce
   
   dispatchAction({
       type:'select',
   
       // Use index or id or name to specify the series.
       // You can use an array to specify multiple series.
       seriesIndex?: number | number[],
       seriesId?: string | string[],
       seriesName?: string | string[],
   
       // The index of the data item, if not specified, you can also specify the data item by name through the name attribute
       dataIndex?: number | number[],
       // Optional, data item name, ignored when there is dataIndex
       name?: string | string[],
   })
   dataIndex uses an array, [0,1], which does not take effect directly.
   
   ### Current Behavior
   
     series: [
             {
               data: airData,
               geoIndex: 0, // Associate air quality data with the 0th geo configuration
               type:'map'
             },
             {
               data: scatterData, // Configure the coordinate data of the scattered points
               type:'effectScatter',
               coordinateSystem:'geo', // Specify the coordinate system used by the scattered point geo coordinate system
               rippleEffect: {
                 scale: 4 // Set the scale of the ripple animation
               }
             }
           ],
   
   window.setInterval(() => {
   console.log('weiwei')
   
   mCharts.dispatchAction({
   type:'showTip',
   seriesIndex: [0, 1],
   dataIndex: index
   });
   
   oldIndex = index
   
   
   index++
   if (index >= airData.length) {
   index = 0
   }
   }, 2000)
       })
   I have two series, using dataIndex: [0,1], it should show two, but none of them are displayed.
   
   ### Expected Behavior
   
     series: [
             {
               data: airData,
               geoIndex: 0, // Associate air quality data with the 0th geo configuration
               type:'map'
             },
             {
               data: scatterData, // Configure the coordinate data of the scattered points
               type:'effectScatter',
               coordinateSystem:'geo', // Specify the coordinate system used by the scattered point geo coordinate system
               rippleEffect: {
                 scale: 4 // Set the scale of the ripple animation
               }
             }
           ],
   
   window.setInterval(() => {
   console.log('weiwei')
   
   mCharts.dispatchAction({
   type:'showTip',
   seriesIndex: [0, 1],
   dataIndex: index
   });
   
   oldIndex = index
   
   
   index++
   if (index >= airData.length) {
   index = 0
   }
   }, 2000)
       })
   I have two series, using dataIndex: [0,1], it should show two.
   
   ### Environment
   
   ```markdown
   -OS:
   -Browser:
   -Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_
   </details>


-- 
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-unsubscribe@echarts.apache.org

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



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