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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to