You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "huihui925 (via GitHub)" <gi...@apache.org> on 2025/02/24 11:22:07 UTC

[I] [Bug] 时间轴没有始终显示min和max,且label会重叠 [echarts]

huihui925 opened a new issue, #20785:
URL: https://github.com/apache/echarts/issues/20785

   ### Version
   
   5.2.2
   
   ### Link to Minimal Reproduction
   
   无
   
   ### Steps to Reproduce
   
   option = {
     xAxis: {
       type: 'time',
       min:'2019-10-09 01:00:00',
       max:'2019-10-20 01:00:00',
       axisLabel:{
         formatter:'{yyyy}-{MM}-{dd}\n{hh}:{mm}:{ss}'
       }
     },
     yAxis: {
       type: 'value',
       boundaryGap: [0, '30%']
     },
     visualMap: {
       type: 'piecewise',
       show: false,
       dimension: 0,
       seriesIndex: 0,
       pieces: [
         {
           gt: 1,
           lt: 3,
           color: 'rgba(0, 0, 180, 0.4)'
         },
         {
           gt: 5,
           lt: 7,
           color: 'rgba(0, 0, 180, 0.4)'
         }
       ]
     },
     series: [
       {
         type: 'line',
         smooth: 0.6,
         symbol: 'none',
         lineStyle: {
           color: '#5470C6',
           width: 5
         },
         markLine: {
           symbol: ['none', 'none'],
           label: { show: false },
           data: [{ xAxis: 1 }, { xAxis: 3 }, { xAxis: 5 }, { xAxis: 7 }]
         },
         areaStyle: {},
         data: [
           ['2019-10-10 01:00:00', 200],
           ['2019-10-11 01:00:00', 560],
           ['2019-10-12 01:00:00', 750],
           ['2019-10-13 01:00:00', 580],
           ['2019-10-14 01:00:00', 250],
           ['2019-10-15 01:00:00', 300],
           ['2019-10-16 01:00:00', 450],
           ['2019-10-17 01:00:00', 300],
           ['2019-10-18 01:00:00', 100]
         ]
       }
     ]
   };
   
   ### Current Behavior
   
   目前:设置type:'time',min,max 后时间轴没有始终显示min,max,且label会重叠。
   
   ![Image](https://github.com/user-attachments/assets/c297420a-dbbd-4049-a38a-827fe515924f)
   
   ### Expected Behavior
   
   期望:坐标轴最小label为min,最大label为max,中间自动根据图表宽度动态显示不同时间,不固定分割个数,且label不重叠。格式为'{yyyy}-{MM}-{dd}\n{hh}:{mm}:{ss}'
   
   不想固定分割个数,和手动计算数据设置interval。
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   ### Any additional comments?
   
   _No response_


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


Re: [I] [Bug] 时间轴没有始终显示min和max,且label会重叠 [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20785:
URL: https://github.com/apache/echarts/issues/20785#issuecomment-2678970529

   Apparently ```axisLabel: { showMinLabel: true, showMaxLabel:true, ...}``` fixes it.
   📌 please close issue if problem solved.


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


Re: [I] [Bug] 时间轴没有始终显示min和max,且label会重叠 [echarts]

Posted by "huihui925 (via GitHub)" <gi...@apache.org>.
huihui925 commented on issue #20785:
URL: https://github.com/apache/echarts/issues/20785#issuecomment-2680134082

   > Apparently `axisLabel: { hideOverlap: true, showMinLabel: true, showMaxLabel: true, ...}` fixes it. 📌 please close issue if problem solved.
   
   解决了 非常感谢
   


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


Re: [I] [Bug] 时间轴没有始终显示min和max,且label会重叠 [echarts]

Posted by "huihui925 (via GitHub)" <gi...@apache.org>.
huihui925 closed issue #20785: [Bug] 时间轴没有始终显示min和max,且label会重叠
URL: https://github.com/apache/echarts/issues/20785


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


Re: [I] [Bug] 时间轴没有始终显示min和max,且label会重叠 [echarts]

Posted by "huihui925 (via GitHub)" <gi...@apache.org>.
huihui925 commented on issue #20785:
URL: https://github.com/apache/echarts/issues/20785#issuecomment-2678135735

   我发现类目轴就不会重叠,个数和显示的内容都是动态的,期望能达到类似要求,同时坐标轴的min和max 可以根据设置的显示


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


Re: [I] [Bug] 时间轴没有始终显示min和max,且label会重叠 [echarts]

Posted by "huihui925 (via GitHub)" <gi...@apache.org>.
huihui925 commented on issue #20785:
URL: https://github.com/apache/echarts/issues/20785#issuecomment-2678131414

   我发现类目轴就不会重叠,个数和显示的内容都是动态的,期望能达到类似要求,同时坐标轴的min和max 可以根据设置的显示


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


Re: [I] [Bug] 时间轴没有始终显示min和max,且label会重叠 [echarts]

Posted by "echarts-bot[bot] (via GitHub)" <gi...@apache.org>.
echarts-bot[bot] commented on issue #20785:
URL: https://github.com/apache/echarts/issues/20785#issuecomment-2678126352

   @huihui925 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] The timeline does not always show min and max, and the labels overlap
   </details>


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