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/07/30 12:36:58 UTC

[GitHub] [echarts] xianchenxy opened a new issue #15445: showTip无法打开 series' value为 '-'对应的 tooltip

xianchenxy opened a new issue #15445:
URL: https://github.com/apache/echarts/issues/15445


   问题描述:
   > 点击 markPoint,打开series[0]第n位的 tooltip,当第n位的 value有数据时正常,当 value为 '-'时 tooltip不显示。
   
   调用方式:
   ```javascript
   chartInstance.on('click', params => {
     if (params.componentType === 'markPoint') {
       chartInstance.dispatchAction({
         type: 'showTip',
         seriesIndex: 0,
         dataIndex: params.data._absolutePos // 手动在外部绑定的位置信息,已确定位置信息正确
       })
     }
   })
   ```
   
   逻辑:
   > 通过点击 `markPoint`,`showTip`打开 `series[0]`第`_absolutePos`位置上的 `tooltip`。
   
   tooltip面板样式:
   首先点击markPoint,打开 `_absolutePos`上有数据的一项,功能正常,tooltip面板样式为:
   ```
   <div style="position: absolute; display: none; border-style: solid; white-space: nowrap; z-index: 9999999; transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s; background-color: rgba(50, 50, 50, 0.7); border-width: 0px; border-color: rgb(51, 51, 51); border-radius: 4px; color: rgb(255, 255, 255); font: 14px / 21px &quot;Microsoft YaHei&quot;; padding: 5px; left: 211.954px; top: 291.246px;">
       <div style="padding: 2px 8px 2px 6px;max-height: 450px;overflow-y: auto;">
           <p style="max-width: 1000px;white-space: pre-wrap;">2021-06-01(周二;儿童节;30)</p>
           <p>
               <span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:$4fa8f9;"></span>
               活跃用户: 5,722</p>
           <p>
               <span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:$6ec71e;"></span>
               新增用户: 3,308</p>
       </div>
   </div>
   ```
   
   然后再打开 `_absolutePos`上 `value`为 '-'时,tooltip面板样式为:
   (tooltip样式增加了 `display: none`,其他样式和内容都没有发生改变)
   ```
   <div style="position: absolute; display: none; border-style: solid; white-space: nowrap; z-index: 9999999; transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s; background-color: rgba(50, 50, 50, 0.7); border-width: 0px; border-color: rgb(51, 51, 51); border-radius: 4px; color: rgb(255, 255, 255); font: 14px / 21px &quot;Microsoft YaHei&quot;; padding: 5px; left: 211.954px; top: 291.246px;">
     <div style="padding: 2px 8px 2px 6px;max-height: 450px;overflow-y: auto;">
       <p style="max-width: 1000px;white-space: pre-wrap;">2021-06-01(周二;儿童节;30)</p>
       <p>
         <span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:fa8f9;"></span>
         活跃用户: 5,722</p>
       <p>
         <span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:ec71e;"></span>
         新增用户: 3,308</p>
     </div>
   </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

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 #15445: showTip无法打开 series' value为 '-'对应的 tooltip

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


   This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. 🙊
   Sorry for this, but it helps save our maintainers' time so that more developers get helped.
   Feel free to create another issue using the issue template.
   
   If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again.
   
   这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。
   为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。
   如果您愿意,请使用 issue 模板重新创建 issue。
   
   如果您认为虽然没有使用模板,但您已经提供了复现问题的充分描述,或者您的问题无法使用模板表达,也可以重新 open 这个 issue。


-- 
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] closed issue #15445: showTip无法打开 series' value为 '-'对应的 tooltip

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] closed issue #15445:
URL: https://github.com/apache/echarts/issues/15445


   


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