plainheart commented on issue #21753:
URL: https://github.com/apache/echarts/issues/21753#issuecomment-5694914266

   This makes sense. To achieve deterministic jitter layout when data remains 
unchanged, we could introduce a way to configure a custom random number 
generator or a random seed.
   
   How about adding options like `jitterRng` (or `jitterRandom`) to the 
configuration?
   
   Here is a quick conceptual example using a seeded random generator (like 
[`seedrandom`](https://github.com/davidbau/seedrandom)):
   
   The usage is like this,
   
   ```html
   <script 
src="https://cdnjs.cloudflare.com/ajax/libs/seedrandom/3.0.5/seedrandom.min.js";></script>
   <script>
   const option = {
     // ...
     xAxis: {
       type: 'category',
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
       jitter: (width / 7) * 0.8,
       // Accept a custom RNG function
       jitterRng: new Math.seedrandom('jitter'),
     },
     // ...
   }
   </script>
   ```
   
   WDYT? @100pah @Ovilia @wydsjyoung 


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

Reply via email to