korbit-ai[bot] commented on code in PR #33191:
URL: https://github.com/apache/superset/pull/33191#discussion_r2051807504


##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts:
##########
@@ -488,6 +488,7 @@ export default function transformProps(
       formatter: xAxisFormatter,
       rotate: xAxisLabelRotation,
     },
+    splitNumber: data.length,

Review Comment:
   ### Unbounded splitNumber causing potential performance and readability 
issues <sub>![category 
Performance](https://img.shields.io/badge/Performance-4f46e5)</sub>
   
   <details>
     <summary>Tell me more</summary>
   
   ###### What is the issue?
   Setting splitNumber equal to data.length can cause performance and 
readability issues when dealing with large datasets.
   
   ###### Why this matters
   When data length is large (e.g., hundreds or thousands of points), forcing 
display of all labels will cause them to overlap and become unreadable, while 
also potentially impacting chart rendering performance.
   
   ###### Suggested change ∙ *Feature Preview*
   Add a reasonable upper limit to the splitNumber value to prevent performance 
degradation and ensure readability:
   
   ```typescript
   splitNumber: Math.min(data.length, 50), // or another appropriate maximum 
value
   ```
   
   
   ###### Provide feedback to improve future suggestions
   [![Nice 
Catch](https://img.shields.io/badge/👍%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/49bac936-73e8-4cdb-a19e-890b12343523/upvote)
 
[![Incorrect](https://img.shields.io/badge/👎%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/49bac936-73e8-4cdb-a19e-890b12343523?what_not_true=true)
  [![Not in 
Scope](https://img.shields.io/badge/👎%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/49bac936-73e8-4cdb-a19e-890b12343523?what_out_of_scope=true)
 [![Not in coding 
standard](https://img.shields.io/badge/👎%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/49bac936-73e8-4cdb-a19e-890b12343523?what_not_in_standard=true)
 
[![Other](https://img.shields.io/badge/👎%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/49bac936-73e8-4cdb-a19e-890b12343523)
   </details>
   
   <sub>
   
   💬 Looking for more details? Reply to this comment to chat with Korbit.
   </sub>
   
   <!--- korbi internal id:bc3f3732-aba7-4157-a4d5-bf18b6bf451d -->
   
   
   [](bc3f3732-aba7-4157-a4d5-bf18b6bf451d)



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to