You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/05/23 03:29:13 UTC

[GitHub] [incubator-echarts] vv-lin commented on issue #10524: 【功能建议】建议ECharts图例和悬停提示支撑部分html内容,在某些专业领域对此很注重。

vv-lin commented on issue #10524: 【功能建议】建议ECharts图例和悬停提示支撑部分html内容,在某些专业领域对此很注重。
URL: https://github.com/apache/incubator-echarts/issues/10524#issuecomment-495053947
 
 
   您好,非常感谢您百忙之中的答复!
   我没有仔细研究过ECharts的源码,所以不知道legend的具体实现过程。
   但是我有个构想,当然,这构想仅供参考:
   目前legend和series中的name必须一致,所以我简单粗暴的理解为,legend和series是通过名称关联。
   那么是不是可以让legend支持key-value这种模式呢,显示的时候是value,关联的时候是key。
   比如可以在legend中构建:
   legend: {
       data: [{name: 'key1', text: 'm<sup>3</sup>'}, {name: 'key2', text: 'Na<sup>+</sup>'}]
   }
   或:
   legend: {
       data: ['key1', 'key2'],
       text: ['m<sup>3</sup>', 'Na<sup>+</sup>']
   }
   
   当然,如何构建只是方式而已,确立关联关系才是重点。这个改动量应该很大。
   
   
   鼠标悬停确实是指的tooltip,我的意思是如果legend中支持html,那么对应tooltip应该自动就变成了legend中的样式。
   举例:
   legend中变成了‘m³’,那么在tooltip中如果显示m3就是不对的,应该默认就变成了‘m³’。
   
   
   
   
   ------------------ 原始邮件 ------------------
   发件人: "Ovilia"<no...@github.com>;
   发送时间: 2019年5月23日(星期四) 上午10:56
   收件人: "apache/incubator-echarts"<in...@noreply.github.com>;
   抄送: "怑喥嶶涼╭ァ"<10...@noreply.github.com>;
   主题: Re: [apache/incubator-echarts] 【功能建议】建议ECharts图例和悬停提示支撑部分html内容,在某些专业领域对此很注重。 (#10524)
   
   
   
   
   悬停提示是指 tooltip 吗?tooltip 默认是 html 的。图例的 html 是指图例右边的文字吗?这个从技术角度来看不太可能支持 html
    
   —
   You are receiving this because you authored the thread.
   Reply to this email directly, view it on GitHub, or mute the thread.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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