plainheart commented on issue #18073:
URL: https://github.com/apache/echarts/issues/18073#issuecomment-1356965519

   这好像是你转换的问题,根据截图圈出部分的正则表达式来看,只能匹配到数字部分,而无法匹配正负符号,例如,`-120.1` 会被转换为 
`120.1`,这应该是是 label 位置不对的原因。
   这里转换其实不必那么麻烦,按照如下方式转换即可:
   ```js
   features[index].properties.cp = cpStr.split(',').map(t => +t)
   // 或者
   features[index].properties.cp = cpStr.split(',').map(Number)
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to