Dev10-34 commented on PR #34595:
URL: https://github.com/apache/superset/pull/34595#issuecomment-3195328048

   > Seems like a bit of a band-aid, any reason why we wouldn't fix the core 
issue/functionality?
   
   Short answer: The interval config doesn't work for xAxis values of type 
"time".
   Long answer:
   If you look into heatmaps, we are able to see that configuring the 
XScaleInterval option is able to add the intervals properly irrespective of the 
type of data going into the xaxis (in terms of echarts, the categories are 
time, value and category). This is because the type for x-axis labels is hard 
set to 'category' ( line 251 in 
[superset](https://github.com/apache/superset/tree/master)/[superset-frontend](https://github.com/apache/superset/tree/master/superset-frontend)/[plugins](https://github.com/apache/superset/tree/master/superset-frontend/plugins)/[plugin-chart-echarts](https://github.com/apache/superset/tree/master/superset-frontend/plugins/plugin-chart-echarts)/[src](https://github.com/apache/superset/tree/master/superset-frontend/plugins/plugin-chart-echarts/src)/[Heatmap](https://github.com/apache/superset/tree/master/superset-frontend/plugins/plugin-chart-echarts/src/Heatmap)/transformProps.ts).
  
   Not sure why this is the way it happens, but it allows all the timestamp 
intervals in Heatmaps to become a configurable property. Under Timeseries type 
of charts, however, the type of xAxis is not hard coded. This results in the 
xAxisInterval configuration to not function when the type of selected column is 
of "time".
   Hence, taking a bit of an idea from this : 
https://github.com/apache/superset/pull/33191/files#r2055905885, I have made it 
so that  intervals of timestamp type of xAxis are able to be set properly as 
well. 
   One way to do it was to set the max intervals between each timestamp as the 
selected timegrain itself.
   The only downside to it is that timgrainsqla property doesn't have all the 
Timegrain options. I am wondering if I should include all the options in a 
seperate PR as well


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