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 2020/08/14 07:07:18 UTC

[GitHub] [incubator-echarts] luoye111 opened a new issue #13131: dispatchAction showTip 数据为0时不触发

luoye111 opened a new issue #13131:
URL: https://github.com/apache/incubator-echarts/issues/13131


   
   ` var option = {
           // x轴控制
           xAxis: {
               type: 'category',
               data: x,
               triggerEvent: true,
               position: 'bottom',
               offset: 20,
               axisLine: {
                   show: false,
               },
               // x轴标签 显示控制
               axisLabel: {
                   show: true,
                   padding: [5, 3, 2, 3],
               },
               boundaryGap: false,
               axisTick: {
                   show: false,
               }
           },
           //y轴控制
           yAxis: {
               type: "value",
               splitLine: {
                   show: false
               },
               axisTick: {
                   show: false
               },
               axisLabel: {
                   show: false
               },
               //y轴轴线控制
               axisLine: {
                   show: false,
               }
           },
           //折线图控制
           series: [
               {
                   type: 'line',
                   data: y,
                   showSymbol: false,
                   //拐弯圆圈样式控制
                   itemStyle: {
                       borderColor: "#3D414A"
   
                   },
                   smooth: 0.5,
                   smoothMonotone: 'x',
                   //线条样式控制
                   lineStyle: {
                       color: "#3D414A",
                       shadowColor: 'rgba(0, 0, 0, 0.2)',
                       shadowBlur: 8,
                       shadowOffsetY: 5
   
                   },
               }],
           //调试图表
           grid: {
               //图表距离左侧的距离
               left: "15%",
               bottom: "25%",
               right: "15%",
               top: "3%"
           },
           //提示框
           tooltip: {
               trigger: "axis",
               //提示框位置自定义,point是鼠标的x,y坐标
               position: function (point) {
                   return [point[0], "10%"];
               },
               // triggerOn: 'none',
               padding: 0,
               backgroundColor: "transparent",
               //自定义提示框
               formatter(parmes) {
                   let val = "";
                   return (
                       `<div class="tip_chart">
                       <div class="item">
                           <span class="y r"></span>
                           <span class="t">${parmes[0].data[1]}分钟</span>
                       </div>
                       <div class="item">
                           <span class="y b"></span>
                           <span class="t">${parmes[1].data[1]}分钟</span>
                       </div>
                       </div>`
                   );
               }
           },
           axisPointer: {
               type: 'line',
               lineStyle: {
                   type: 'dashed',
                   color: 'rgba(238, 230, 210, 1)'
               }
           },
       }
    echart.on('click', function (params, e) {
           let index;
           index = parseInt(params.value - 1)
           console.log(params)
           echart.dispatchAction({
               type: 'showTip',
               seriesIndex: 0,
               dataIndex: index,
           });
       })
   `


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



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


[GitHub] [incubator-echarts] Ovilia closed issue #13131: dispatchAction showTip 数据为0时不触发

Posted by GitBox <gi...@apache.org>.
Ovilia closed issue #13131:
URL: https://github.com/apache/incubator-echarts/issues/13131


   


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



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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13131: dispatchAction showTip 数据为0时不触发

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


   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.

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