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/09/16 08:12:20 UTC

[GitHub] [echarts] victorting opened a new issue #15737: 饼图里的tooltip自定义格式,获取到的dimensionNames是空数组

victorting opened a new issue #15737:
URL: https://github.com/apache/echarts/issues/15737


   ### Version
   5.2.0
   
   ### Steps to reproduce
   用的版本是echarts5.2.0,具体配置数据如下:
   {
   "animation": false,
   "tooltip": {
   "trigger": "item",
   "backgroundColor": "transparent",
   "appendToBody": true,
   "confine": true,
   "formatter": function(params) {
   console.log(params);
   }
   },
   "grid": {
   "top": 24,
   "left": 24,
   "right": 24,
   "bottom": 24
   },
   "legend": {
   "orient": "vertical",
   "icon": "circle",
   "type": "scroll",
   "itemWidth": 8,
   "itemHeight": 8,
   "textStyle": {
   "borderWidth": 1,
   "color": "#0"
   },
   "top": 214,
   "data": [
   {
   "name": "edge"
   },
   {
   "name": "arcana_web_access"
   },
   {
   "name": "arcana_download_access"
   }
   ],
   "pageIconColor": "rgba(0, 0, 0, 0.65)",
   "pageIconInactiveColor": "rgba(0, 0, 0, 0.25)",
   "pageTextStyle": {
   "color": "#0"
   },
   "right": 15
   },
   "series": {
   "type": "pie",
   "radius": [
   "0%",
   "70%"
   ],
   "center": [
   "50%",
   "50%"
   ],
   "startAngle": 90,
   "animation": true,
   "bleedMargin": 10,
   "left": 24,
   "top": 24,
   "bottom": 24,
   "right": 134,
   "dimensions": [
   "source",
   "count"
   ],
   "percentPrecision": 2,
   "data": [
   {
   "name": "edge",
   "value": 98009,
   "label": {
   "position": "inside",
   "rotate": true
   },
   "itemStyle": {
   "normal": {
   "color": "#2252D3"
   }
   }
   },
   {
   "name": "arcana_web_access",
   "value": 11529,
   "label": {
   "position": "inside",
   "rotate": true
   },
   "itemStyle": {
   "normal": {
   "color": "#2270D4"
   }
   }
   },
   {
   "name": "arcana_download_access",
   "value": 2,
   "label": {
   "position": "inside",
   "rotate": true
   },
   "itemStyle": {
   "normal": {
   "color": "#228ED4"
   }
   }
   }
   ],
   "label": {
   "show": true
   }
   }
   }
   当鼠标hover到饼图项上时获取到的params数据是这样的:
   {
   "componentType": "series",
   "componentSubType": "pie",
   "componentIndex": 0,
   "seriesType": "pie",
   "seriesIndex": 0,
   "seriesId": "\u0000series\u00000\u00000",
   "seriesName": "series\u00000",
   "name": "edge",
   "dataIndex": 0,
   "data": {
   "name": "edge",
   "value": 98125,
   "label": {
   "position": "inside",
   "rotate": true
   },
   "itemStyle": {
   "color": "#2252D3"
   },
   "emphasis": {
   "label": {}
   }
   },
   "value": 98125,
   "color": "#2252D3",
   "dimensionNames": [],
   "encode": {
   "value": [
   0
   ]
   },
   "$vars": [
   "seriesName",
   "name",
   "value",
   "percent"
   ],
   "percent": 89.4,
   "marker": "<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#2252D3;">"
   }
   
   ### What is expected?
   formatter里回调函数的参数params里的dimensionNames应该包含dimensions的数据
   
   ### What is actually happening?
   formatter里回调函数的参数params里的dimensionNames为空数组
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
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] echarts-bot[bot] commented on issue #15737: 饼图里的tooltip自定义格式,获取到的dimensionNames是空数组

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15737:
URL: https://github.com/apache/echarts/issues/15737#issuecomment-920686391






-- 
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] victorting commented on issue #15737: 饼图里的tooltip自定义格式,获取到的dimensionNames是空数组

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


   > I have this issue too,but it only happend on pie compoment, bar componemt is ok. BTW v5.1.2 work well,so you can use v5.1.2 @victorting
   
   Thx, I'll try later!


-- 
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] xuanxuan321 commented on issue #15737: 饼图里的tooltip自定义格式,获取到的dimensionNames是空数组

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


   I have this issue too,but it only happend on pie compoment, bar componemt is ok.
   BTW v5.1.2 work well,so you can use v5.1.2  @victorting 


-- 
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] yih0620 commented on issue #15737: 饼图里的tooltip自定义格式,获取到的dimensionNames是空数组

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


   I have this issue too.


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