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 2022/04/11 12:21:59 UTC

[GitHub] [echarts] kendrickcheung opened a new issue, #16865: [Bug] 4 items should be show, but 3.

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

   ### Version
   
   5.3.2
   
   ### Link to Minimal Reproduction
   
   https://codepen.io/kendrickcheung/pen/MWrBYZg
   
   ### Steps to Reproduce
   
   let countryData = [
      [0, '中国'],
     [0, '日本']
     [0, '美国'],
     [0,'英国']
   ]
   
   var option = {
   dataset: {
               source: countryData,
             },
   }
   
   countryData.forEach((val, key) => {
       const curYear = `${1960 + 1} [YR${1960 + 1}]`;
       val[0] = data[key][curYear];// when I change the data the bug occurs
       // val[0] = 549879; 
     });
   myChart.setOption(option);
   
   ### Current Behavior
   
   ![微信截图_20220411201436](https://user-images.githubusercontent.com/80992771/162737195-e62a2185-a9aa-45b5-a7df-415ef650f2ba.png)
   
   
   ### Expected Behavior
   
   ![微信截图_20220411201436](https://user-images.githubusercontent.com/80992771/162737782-07f99cb4-295c-44bf-af3f-48425e8ea0a6.png)
   
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### 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-unsubscribe@echarts.apache.org.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


[GitHub] [echarts] kendrickcheung closed issue #16865: [Bug] 4 items should be show, but 3.

Posted by GitBox <gi...@apache.org>.
kendrickcheung closed issue #16865: [Bug]  4 items should be show, but 3.
URL: https://github.com/apache/echarts/issues/16865


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


[GitHub] [echarts] jiawulin001 commented on issue #16865: [Bug] 4 items should be show, but 3.

Posted by GitBox <gi...@apache.org>.
jiawulin001 commented on issue #16865:
URL: https://github.com/apache/echarts/issues/16865#issuecomment-1095923815

   Use `val[0] = Number(data[key][curYear]);` instead.
   The data in your dataset are all of `string` type, so dataset will treat the first row as the label of the following rows.


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


[GitHub] [echarts] kendrickcheung commented on issue #16865: [Bug] 4 items should be show, but 3.

Posted by GitBox <gi...@apache.org>.
kendrickcheung commented on issue #16865:
URL: https://github.com/apache/echarts/issues/16865#issuecomment-1096309970

   > Use `val[0] = Number(data[key][curYear]);` instead. The data in your dataset are all of `string` type, so dataset will treat the first row as the label of the following rows.
   
   Thanks a lot! It works


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