luojiandan commented on issue #19346:
URL: https://github.com/apache/echarts/issues/19346#issuecomment-1833591478

   > As a workaround you can adjust the symbol yourself: 
[Example](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jmTAwP6QIG5gRqysVBx0jLh4tA4keIkQVISwovzEHoLCYgCMAKwADDywAEwAzDX1dQAstXVlABy1ZQ0Vva0A7B0AbFXWoR4U1HT-ENDKU6R45AC2AEYRdNAwyoV2JLZ2ANwoKGvkAMLajBxgAHQwABS0eNrAAO5RMs8gd4w1ngAJQIAB8sEuNzujyyYAA8uAoNBnkgskZcmI0estv46FQ1uBrhAOPR_Mo7NY7MDgWcLtdbvcnijaNoIAIqD9an8AUDQfAIVDGbDOYjIC80dlMflsZttrJdot0lSaScgA)
   
   hi @MatthiasMert thanks for you replay.
   
![image](https://github.com/apache/echarts/assets/5663556/d474e682-37ce-4711-8dd6-0f0bb27b856c)
   my code is:
   ```
   var 
arrDates=['23-11-16','23-11-17','23-11-18','23-11-19','23-11-20','23-11-21','23-11-22']
   var arrPrices=[8.6,5.3,6.2,7.1,4.2,7.8,3.5]
   var arrDatas=[]; 
   var arrData2=[];  //最后一个标记点
   var intLength=arrDates.length;
   for(var i=0;i<arrDates.length;i++){
     var isLast=i==arrDates.length-1?true:false;
     arrDatas.push({
       name:arrDates[i],
       value:arrPrices[i],
       last:isLast
     });
     
     if(i==arrDates.length-1){
       arrData2.push(i);
       arrData2.push(arrPrices[i]);
     }
   }
   
   var dataDesc='数据更新时间:10-08 14:25'
   
   option = {
     grid:{
       left:'5%'
     },
     title:{
       text:'价格波动图',
       left:'4%',
       top:'1%',
       subtext:dataDesc,
       subtextStyle:{
         color:'#CFCFCF',
         fontSize:13,
         position:'right',
       }
     },
     graphic:{
       elements:[
         {
           type:'text',
           textContent:'XXXX',
           right:'10%',
           top:'10%'
         }
       ]
     },
     xAxis: {
       type: 'category',
       data: arrDatas.map(item=>item.name),
       boundaryGap:false,
       axisLine:{
         show:false,
       },
       axisTick:{
         show:false
       },
       axisLabel:{
         show:true,
         color:'rgba(200,200,200,1)',
         fontFamily:'黑体',
         fontSize:13,
         formatter:function(params,index){
           if (index==intLength-1||index==0) {
             return params  //只显示首、尾标注
           }
         }
       }
     },
     yAxis: {
       type: 'value',
       interval:4,
       axisLine:{
         show:true,
         lineStyle:{
           color:'rgba(242,242,242,0.9)'
         }
       },
       axisLabel:{
         color:'rgba(200,200,200,1)'
       },
       splitLine:{
         show:true,
         lineStyle:{
           color:'rgba(242,242,242,0.9)'
         }
       }
     },
     tooltip:{
       trigger:'axis',
       backgroundColor:'#777777',
       borderWidth:0,
       padding:[6,10,6,10],
       formatter:function(params,ticket,callback){
         var data=params[0].data;
         return data.last?'':`${data.name} ¥${data.value}`
       },
       textStyle:{
         color:'white',
         fontSize:13,
       }
     },
     series: [
       {
         data:arrDatas,
         type: 'line',
         symbol:'circle',
         symbolSize:6,
         showSymbol:false,
         smooth:false,
         markPoint:{
           data:[
             {
               name:'最大值',
               coord:arrData2,
               symbol:'circle',
               symbolSize:8,
               animation:false,
               label:{
                 show:true,
                 position:'top',
                 backgroundColor:'#EB432E',
                 color:'white',
                 fontFamily:'sans-serif',
                 fontSize:13,
                 align:'right',
                 padding:[6,10,6,10],
                 borderRadius:8,
                 formatter:function(params){
                   var index=params.data.coord[0];
                   return `${arrDates[index]} 当前 ¥${params.data.coord[1]}`
                 }
               }
             }
           ]
         },
         itemStyle:{
           color:'#EB432E',
         },
         lineStyle:{
           width:1.5,
         },
         areaStyle: { //区域填充样式
           normal: {
               
//线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
               color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                       offset: 0,
                       color: "rgba(244,156,144,0.5)"
                   },
                   {
                       offset: 1,
                       color: "rgba(255,255,255,0.01)"
                   }
               ], false)
           }
         },
       }
     ]
   };
   
   /* event bug
   myChart.on('showtip1',function(params){
     var index=params.dataIndex;
     if(index==intLength-1){
       option.series[0].markPoint.data[0].label.show=true;  
     }else{
       option.series[0].markPoint.data[0].label.show=false;
     }
     myChart.setOption(option);
   })
   
   myChart.on('hidetip1',function(params){
     option.series[0].markPoint.data[0].label.show=true;  
     myChart.setOption(option);
   })
   */
   ```


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

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