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

[I] [Bug] Inconsistent xAxis axisTick [echarts]

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

   ### Version
   
   5.6.0
   
   ### Link to Minimal Reproduction
   
   https://jsfiddle.net/mk3dzp49/
   
   ### Steps to Reproduce
   
   Chart is a simple line plot with a grid, with the x-axis defined as follows:
   
   ```
         xAxis: {
           "type": "value",
           "minorTick": {
               "show": "true",
               "splitNumber": 5
           },
           "minorSplitLine": {
               "show": "true"
           },
           "axisLabel": {
               "show": "true"
           },
           "axisTick": {
               "customValues": vTickData
           },
           "splitLine": {
               "show": "true",
               "lineStyle": {
                   "color": '#ff0000',
                   "type": 'solid',
                   "width": 1
               }
           },
         },
   ```
   
   ### Current Behavior
   
   The thin red vertical lines appear to be randomly placed. 
   
   ![Image](https://github.com/user-attachments/assets/a9e49efc-ac59-4f57-8509-1ff183c41a5f)
   
   ### Expected Behavior
   
   I want to have one thick red line for every 5 thin red lines, for example. But that doesn't appear to be what's going on here. Instead I get several thick lines and thin lines placed at random.
   
   y-axis lines don't appear to have the same issue.
   
   ### Environment
   
   ```markdown
   - OS: Win 11
   - Browser: Chrome
   - Framework: None?
   ```
   
   ### 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] Inconsistent xAxis axisTick [echarts]

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

   Thanks, @MatthiasMert !
   
   However, something else seems to be wrong in the examples and in the documentation: I can't see them at all.
   
   ![Image](https://github.com/user-attachments/assets/b908e939-b0b2-48b2-85cf-92deea2ee66b)


-- 
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] Inconsistent xAxis axisTick [echarts]

Posted by "zemmyang (via GitHub)" <gi...@apache.org>.
zemmyang closed issue #20726: [Bug] Inconsistent xAxis axisTick
URL: https://github.com/apache/echarts/issues/20726


-- 
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] Inconsistent xAxis axisTick [echarts]

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

   Works now. Thanks!


-- 
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] Inconsistent xAxis axisTick [echarts]

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

   As per [documentation](https://echarts.apache.org/en/option.html#xAxis.minorTick.splitNumber) `minorTick.splitNumber` revers to the number of **intervals**, not the number of minorTicks / splitLines.  The documentation does not specify what exactly is split tho. It seems to be the interval between two labels (which is not neccessarily equal to the interval between two ticks).
   
   If you align ticks and axisLabel it should work as expected: [Example](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=MYewdgzgLgBANgUzDAvDAjABkwbgFCiSwAeAIgIZTmowCCATveQJ4B0AZvSALYAUA3vCQBzKAAsAXEOQBfADQxeASlQA-PDBgBZSmI5wQIerx3jWTMABMeymACppSvEvyFoMZhSo0GTNpxtBRDBRSWkYeUUANwUAaxUUVRhYmABqDBcCcHdLSmo0TzzWbnIAB15eRHYoBQBLS2IEpIBtKpqYMjzm-uIAXV7MvBBSqFrwGn4NDtpiWogpSc1NKGZShCkAcijyOABXBA25Kc1yWYgAFVrgWIXjpZ3a4TAAdVrxABlyACMEOCkoej7I5LCLApYQUpwN7vWpgdYwRYgmAQMQgADu_0BCDBIKhcIAyitEAsYKADPRNvQEJYNhE7vI7txYUZLtdbkjkaiMTAAUC7poIVCoAA5XbcH4UmAANnpOJgTLARnxkOhsPhiJBKPRmL5HLxCEJzGJCNJIHJm2EVKQtJksqmDM0zBmcwWDuRCHotQQ8xgzTuGqWKzWm31h35yOY4rNm0VcLDHNyVCkifI9KmvTwMhwQA)
   
   If you need specific tick intervals you can control them with [interval](https://echarts.apache.org/en/option.html#xAxis.interval), [minInterval ](https://echarts.apache.org/en/option.html#xAxis.minInterval) and [maxInterval](https://echarts.apache.org/en/option.html#xAxis.maxInterval): [Example](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=MYewdgzgLgBANgUzDAvDAjABkwbgFCiSwAeAIgIZTmowCCATveQJ4B0AZvSALYAUA3vCQBzKAAsAXEOQBfADQxeASlQA-PDBgBZSmI5wQIerx3jWTMABMeymACppSvEvyFoMZhSo0GTNpxtBRDBRSWkYeUUANwUAaxUUVRhYmABqDBcCcHdLSmo0TzzWbnIAB15eRHYoBQBLS2IEpIBtKpqYMjzm-uIAXV7MvBBSqFrwGn4NDtpiWogpSc1NKGZShCkAcijyOABXBA25Kc1asCgEem24KQBWI6WYclmIABVa4FiF46Wd2uEwADqtXEABlyAAjBDXGBQej7e5LeTfCClODAkGndYwRYPGAQMQgADuUlh8O-mjRYAQAGUVogFjBQAZ6Jt6AhLBsIt8kQ9uKcjG8Pl9cXiCcSYXCEAiHii0VAAHK7biQlkwABs3OlMD5YCM1NR6Mxwtx-KJJMlWopmNpzHp2MZIGZm2EbKQnJkmqmPI8MzmC29EAutQQ8xgzW-OIeKzWm0pB0teOYysdm11VMO5JguSoUmz5G5U16eBkOCAA)


-- 
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] Inconsistent xAxis axisTick [echarts]

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

   There seems to be an issue with the echarts website currently. Here is the code from the example:
   
   ```javascript
   const len = 100;
   const xData = Array.from({ length: len }, () =>
     Math.floor(Math.random() * len)
   );
   const yData = Array.from({ length: len }, (v, k) => k + 1);
   const data = yData.map((left, idx) => [left, xData[idx]]);
   
   option = {
     xAxis: {
       type: 'value',
       //interval: 5,
       axisTick: {
         alignWithLabel: true,
       },
       splitLine: {
         show: true,
         lineStyle: { color: 'red' }
       },
       minorTick: {
         show: true,
         splitNumber: 6
       },
       minorSplitLine: {
         show: true,
         lineStyle: { color: 'green' }
       },
     },
     yAxis: {},
     series: [
       {
         type: 'line',
         symbol: 'none',
         data: data
       }
     ]
   };
   ```
   
   


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