CreateGitzhu opened a new issue, #17110: URL: https://github.com/apache/echarts/issues/17110
### Version 5.2.2 ### Link to Minimal Reproduction _No response_ ### Steps to Reproduce  option = { "tooltip":{ "show":true, "trigger":"axis", "axisPointer":{ "type":"line", "label":{ "backgroundColor":"#6a7985" } }, "confine":true, "backgroundColor":"rgba(255, 255, 255, 0.8)" }, "legend":{ "x":"center", "y":"bottom", "icon":"rect", "itemWidth":14, "itemHeight":10, "itemGap":10, "tooltip":{ "show":true }, "data":[ "105,111,wan_测试a,wan_测试a", "105,106,wan_测试a,wan_测试a", "111,105,wan_测试c,wan_测试c", ] }, "grid":{ "left":"3%", "right":"5%", "bottom":"14%", "containLabel":true }, "xAxis":[ { "type":"time", "boundaryGap":false, "axisLine":{ "onZero":false }, "splitLine":{ "show":false }, "min":"dataMin", "max":"dataMax", "axisLabel":{ "formatter":"{MM}-{dd} {HH}:{mm}", "hideOverlap":true }, "minInterval":60000 } ], "yAxis":{ "type":"value", "minInterval":1, "axisLabel":{ formatter: params => { if (params > 0) { const val = conversionByte(params) return `${val}ps` } else { return '0bps' } } }, "min":"dataMin" }, "series":[ { "name":"105,111,wan_测试a,wan_测试a", "type":"line", "smooth":true, "symbol":"none", "areaStyle":{ }, "lineStyle":{ "opacity":0 }, "emphasis":{ "focus":"series" }, "data":[ [ 1653028620000, 2832 ], [ 1653028680000, 2836 ], [ 1653028740000, 2832 ], [ 1653028800000, 2832 ], [ 1653028860000, 2832 ], [ 1653028920000, 2832 ], [ 1653028980000, 2832 ], [ 1653029040000, 2836 ], [ 1653029100000, 2836 ], [ 1653029160000, 2832 ], [ 1653029220000, 2832 ], [ 1653029280000, 2832 ], [ 1653029340000, 2832 ], [ 1653029400000, 2832 ], [ 1653029460000, 2836 ], [ 1653029520000, 2832 ], [ 1653029580000, 2832 ], [ 1653029640000, 2832 ], [ 1653029700000, 2832 ], [ 1653029760000, 2836 ], [ 1653029820000, 2836 ], [ 1653029880000, 2832 ], [ 1653029940000, 2832 ], [ 1653030000000, 2832 ], [ 1653030060000, 2832 ], [ 1653030120000, 2832 ], [ 1653030180000, 2836 ], [ 1653030240000, 2832 ], [ 1653030300000, 2832 ], [ 1653030360000, 2832 ], [ 1653030420000, 2832 ], [ 1653030480000, 2836 ], [ 1653030540000, 2836 ], [ 1653030600000, 2832 ], [ 1653030660000, 2832 ], [ 1653030720000, 2832 ], [ 1653030780000, 2832 ], [ 1653030840000, 2832 ], [ 1653030900000, 2836 ], [ 1653030960000, 2832 ], [ 1653031020000, 2832 ], [ 1653031080000, 2832 ], [ 1653031140000, 2832 ], [ 1653031200000, 2836 ], [ 1653031260000, 2836 ], [ 1653031320000, 2832 ], [ 1653031380000, 2832 ], [ 1653031440000, 2832 ], [ 1653031500000, 2832 ], [ 1653031560000, 2832 ], [ 1653031620000, 2836 ], [ 1653031680000, 2832 ], [ 1653031740000, 2832 ], [ 1653031800000, 2836 ], [ 1653031860000, 2832 ], [ 1653031920000, 2832 ], [ 1653031980000, 2832 ], [ 1653032040000, 2836 ] ], "itemStyle":{ "color":"#37d7fa" } }, { "name":"105,106,wan_测试a,wan_测试a", "type":"line", "smooth":true, "symbol":"none", "areaStyle":{ }, "lineStyle":{ "opacity":0 }, "emphasis":{ "focus":"series" }, "data":[ [ 1653028620000, 2836 ], [ 1653028680000, 2832 ], [ 1653028740000, 2832 ], [ 1653028800000, 2832 ], [ 1653028860000, 2832 ], [ 1653028920000, 2836 ], [ 1653028980000, 2836 ], [ 1653029040000, 2832 ], [ 1653029100000, 2832 ], [ 1653029160000, 2832 ], [ 1653029220000, 2832 ], [ 1653029280000, 2832 ], [ 1653029340000, 2836 ], [ 1653029400000, 2832 ], [ 1653029460000, 2832 ], [ 1653029520000, 2832 ], [ 1653029580000, 2836 ], [ 1653029640000, 2832 ], [ 1653029700000, 2836 ], [ 1653029760000, 2832 ], [ 1653029820000, 2832 ], [ 1653029880000, 2832 ], [ 1653029940000, 2832 ], [ 1653030000000, 2832 ], [ 1653030060000, 2836 ], [ 1653030120000, 2832 ], [ 1653030180000, 2832 ], [ 1653030240000, 2832 ], [ 1653030300000, 2836 ], [ 1653030360000, 2832 ], [ 1653030420000, 2832 ], [ 1653030480000, 2836 ], [ 1653030540000, 2832 ], [ 1653030600000, 2832 ], [ 1653030660000, 2832 ], [ 1653030720000, 2832 ], [ 1653030780000, 2832 ], [ 1653030840000, 2836 ], [ 1653030900000, 2832 ], [ 1653030960000, 2832 ], [ 1653031020000, 2836 ], [ 1653031080000, 2832 ], [ 1653031140000, 2832 ], [ 1653031200000, 2836 ], [ 1653031260000, 2832 ], [ 1653031320000, 2832 ], [ 1653031380000, 2832 ], [ 1653031440000, 2832 ], [ 1653031500000, 2832 ], [ 1653031560000, 2836 ], [ 1653031620000, 2832 ], [ 1653031680000, 2832 ], [ 1653031740000, 2836 ], [ 1653031800000, 2832 ], [ 1653031860000, 2832 ], [ 1653031920000, 2836 ], [ 1653031980000, 2832 ], [ 1653032040000, 2832 ] ], "itemStyle":{ "color":"#f6bd93" } }, { "name":"111,105,wan_测试c,wan_测试c", "type":"line", "smooth":true, "symbol":"none", "areaStyle":{ }, "lineStyle":{ "opacity":0 }, "emphasis":{ "focus":"series" }, "data":[ [ 1653028620000, 2832 ], [ 1653028680000, 2836 ], [ 1653028740000, 2832 ], [ 1653028800000, 2832 ], [ 1653028860000, 2832 ], [ 1653028920000, 2832 ], [ 1653028980000, 2832 ], [ 1653029040000, 2832 ], [ 1653029100000, 2836 ], [ 1653029160000, 2832 ], [ 1653029220000, 2832 ], [ 1653029280000, 2832 ], [ 1653029340000, 2832 ], [ 1653029400000, 2832 ], [ 1653029460000, 2836 ], [ 1653029520000, 2832 ], [ 1653029580000, 2832 ], [ 1653029640000, 2836 ], [ 1653029700000, 2832 ], [ 1653029760000, 2832 ], [ 1653029820000, 2836 ], [ 1653029880000, 2832 ], [ 1653029940000, 2832 ], [ 1653030000000, 2832 ], [ 1653030060000, 2832 ], [ 1653030120000, 2832 ], [ 1653030180000, 2836 ], [ 1653030240000, 2832 ], [ 1653030300000, 2832 ], [ 1653030360000, 2832 ], [ 1653030420000, 2832 ], [ 1653030480000, 2832 ], [ 1653030540000, 2836 ], [ 1653030600000, 2832 ], [ 1653030660000, 2832 ], [ 1653030720000, 2832 ], [ 1653030780000, 2832 ], [ 1653030840000, 2832 ], [ 1653030900000, 2836 ], [ 1653030960000, 2832 ], [ 1653031020000, 2832 ], [ 1653031080000, 2832 ], [ 1653031140000, 2832 ], [ 1653031200000, 2832 ], [ 1653031260000, 2836 ], [ 1653031320000, 2832 ], [ 1653031380000, 2832 ], [ 1653031440000, 2832 ], [ 1653031500000, 2832 ], [ 1653031560000, 2836 ], [ 1653031620000, 2836 ], [ 1653031680000, 2832 ], [ 1653031740000, 2832 ], [ 1653031800000, 2832 ], [ 1653031860000, 2832 ], [ 1653031920000, 2832 ], [ 1653031980000, 2832 ], [ 1653032040000, 2836 ], [ 1653032100000, 2832 ] ], "itemStyle":{ "color":"#f08903" } }, ] } function conversionByte(count, type) { if (count === null) { return '--' } else if (count == 0) { return type ? '0 B' : '0 b' } // 需要输出 B if (type) count = count / 8 const Yb = count / (1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) const Zb = count / (1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024) const Eb = count / (1024 * 1024 * 1024 * 1024 * 1024 * 1024) const Pb = count / (1024 * 1024 * 1024 * 1024 * 1024) const Tb = count / (1024 * 1024 * 1024 * 1024) const Gb = count / (1024 * 1024 * 1024) const Mb = count / (1024 * 1024) const Kb = count / 1024 let result = null if (Yb > 1) { result = Yb.toFixed(2) + ' Yb' } else if (Zb >= 1) { result = Zb.toFixed(2) + ' Zb' } else if (Eb >= 1) { result = Eb.toFixed(2) + ' Eb' } else if (Pb >= 1) { result = Pb.toFixed(2) + ' Pb' } else if (Tb >= 1) { result = Tb.toFixed(2) + ' Tb' } else if (Gb >= 1) { result = Gb.toFixed(2) + ' Gb' } else if (Mb >= 1) { result = Mb.toFixed(2) + ' Mb' } else if (Kb >= 1) { result = Kb + ' Kb' } else { result = count + ' b' } if (type) result = result.replace('b', 'B') const list = result.split(' ') let resp = '' if (list[0].includes('.')) { resp = `${Number(list[0])} ${list[1]}` } else { resp = result } return resp } ### Current Behavior  ### Expected Behavior Expect repeated ticks on the y-axis to automatically deduplicate ### Environment ```markdown - OS:win10 - Browser:Chrome 101.0.4951.67 - Framework:[email protected] ``` ### 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: [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]
