Ovilia commented on code in PR #20857: URL: https://github.com/apache/echarts/pull/20857#discussion_r2022233118
########## test/axis-break.html: ########## @@ -330,9 +380,9 @@ axisLabel: { showMinLabel: true, showMaxLabel: true, - breakFormatter: (value, index, start, end, gap) => { - return '11:30/13:00' - } + formatter: (value, index) => { + return `${echarts.time.format(value, '{HH}:{mm}')}`; Review Comment: It's nice to have the axis labels adjust position as you provided in this PR. I think there is still requirement to using a single label for breaks with zero gap. For example, in the Intraday stock chart, we may expect the break label to be `11:30/13:00` instead of two labels, like [this real-world chart](https://gushitong.baidu.com/index/ab-000001) shows: <img width="783" alt="image" src="https://github.com/user-attachments/assets/3a70ef24-15f9-44dc-a9d4-d9ecd61fb1eb" /> I tried to hide the start label and add the start/end time in the end label, but I don't know how to make it align to center in this case. ```js formatter: (value, index) => { const date = new Date(value); if (date.getHours() === 11 && date.getMinutes() === 30) { return ''; } if (date.getHours() === 13 && date.getMinutes() === 0) { return '11:30/13:00'; } return `${echarts.time.format(value, '{HH}:{mm}')}`; } ``` <img width="563" alt="image" src="https://github.com/user-attachments/assets/528f5758-3bfe-4f85-9cc1-fd73f5827df6" /> -- 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-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org