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/11/21 01:08:14 UTC

[GitHub] [echarts] lianfengluo opened a new issue, #17943: [Feature] Can I have the legend formatter accept react component instead of just string?

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

   ### What problem does this feature solve?
   
   We would love to customise on legend as a react component, so that we can apply some customer styling on each different section of the `name` in legend.
   
   ### What does the proposed API look like?
   
   Something like
   ```js
   {
      legend: {formatter: (value) => <div>value</div>}
   }
   ```


-- 
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] lianfengluo commented on issue #17943: [Feature] Can I have the legend formatter accept react component instead of just string?

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

   Hey @plainheart
   Yea. I knew that. I am just wondering. Would it be possible to have that in the future just like the tooltip is having?


-- 
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] plainheart commented on issue #17943: [Feature] Can I have the legend formatter accept react component instead of just string?

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

   Unlike the `tooltip` component, the `legend` component doesn't support rendering via HTML elements. 


-- 
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] Ovilia commented on issue #17943: [Feature] Can I have the legend formatter accept react component instead of just string?

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

   @lianfengluo Hi, I don't think this is quite possible. A better way is not to use legend of ECharts but render it using react and call setOption when user clicks the dom.


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