You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "flybbjcs70 (via GitHub)" <gi...@apache.org> on 2026/08/13 02:04:35 UTC

[I] [Bug] jitter not working in Y Axis Config [echarts]

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

   ### Version
   
   6.1.0
   
   ### Link to Minimal Reproduction
   
   https://echarts.apache.org/examples/zh/editor.html?c=scatter-simple&code=yy8oyczPU7BVqOZSUKhwrMgstgIzFRRKKgtSrRTUkxNLUtPziyrVdcCiKYkliVYK0eqJ6rFAfi1IsJJ4XRUV6rEQkazMkpLUIisFYwMDmDnFqUWZqUCDosEKIMYBRStzk_JzgjOrgMYaGUA0ww2E8kAA5CQdkAU6hlAr0MWNRsUHiTicAU0txcDkAkwN6mDRWiAZy1VrDQA&enc=deflate
   
   ### Steps to Reproduce
   
   ```js
   option = {
     xAxis: {
       type: 'category',
       data: ['a'],
       jitter: 300
     },
     yAxis: {
       type: 'category',
       data: ['xx'],
       jitter: 300
     },
     series: [
       {
         symbolSize: 20,
         data: [
             ['a','xx',1],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
             ['a','xx',2],
         ],
         type: 'scatter'
       }
     ]
   };
   
   ```
   
   ### Current Behavior
   
   散点y轴没随机偏移
   
   ### Expected Behavior
   
   散点y轴随机偏移
   
   ### 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] jitter not working in Y Axis Config [echarts]

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

   <img width="1510" height="814" alt="JMP Scatter" src="https://github.com/user-attachments/assets/151226d1-db99-4f64-88f0-cda0dfe20268" />
   (图 - jmp )
   
   <img width="1146" height="580" alt="echarts Scatter" src="https://github.com/user-attachments/assets/9319b0b2-ca76-4968-9ccd-331535fe119e" />
   (图 - echarts)
   
   第一个图是JMP软件的x,y分类,color 值 散点图,我现在用symbolOffset可以实现,不过性能会差,主要是我想使用一维`TypedArray`提高性能,数据量几万到几十万,还要能框选


-- 
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] jitter not working in Y Axis Config [echarts]

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

   I've submitted PR #21729 to fix this.
   
   ## Root cause
   
   The jitterLayout stage only checked the **base axis** (`getBaseAxis()`) for jitter configuration. When both axes are category with jitter, only the base axis direction was jittered; the other axis's jitter was ignored.
   
   ## Fix
   
   `jitterLayout.ts` now also checks the other axis (`coordSys.getOtherAxis()`) — if it's ordinal and has `jitter > 0`, jitter is applied along that direction too. This makes scatter points spread in both x and y directions when both axes are category with jitter configured (like JMP scatter plots).
   
   The fix is a pure frontend/TS change in `src/chart/scatter/jitterLayout.ts`, no API changes required.
   


-- 
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] jitter not working in Y Axis Config [echarts]

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

   Jitter on a category axis implies the other axis is of type 'value'— [Demo](https://echarts.apache.org/examples/en/editor.html?c=scatter-simple&code=7ZKxDsIgEIZ3n-I2FmLaRheMg8_QsemALTGYtjTtacCGd_egaIxP4CADufsO_vuH34yozQBHWDYA9mT1LGIJgG5UAlgjUV3M5BiPtJUoBVRMsnoFV42oJgH5PqPeB-iSzEviLrubYnE0q0krmlXx77qIqOvPpiv1g14XGYeE1dCYltDiROE5aFR9ia4LxIyy0egEZNtdFP7wlrpwgk_OrGU8T3a_efHnP8LfRUrNTMmjZLFIPd31xh-e&enc=deflate)
   This feature was not designed to function with two categorical axes, in my opinion. Perhaps more details about that should be included in the API documentation.


-- 
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] jitter not working in Y Axis Config [echarts]

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

   <img width="1510" height="814" alt="JMP Scatter" src="https://github.com/user-attachments/assets/151226d1-db99-4f64-88f0-cda0dfe20268" />
   (图 - jmp )
   
   <img width="1146" height="580" alt="echarts Scatter" src="https://github.com/user-attachments/assets/9319b0b2-ca76-4968-9ccd-331535fe119e" />
   (图 - echarts)
   
   第一个图是JMP软件的x,y分类,color 值 散点图,我现在用symbolOffset可以实现,不过性能会差,主要是我想使用一维`TypedArray`提高性能,数据量几万到几十万,还要能框选


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