villebro commented on issue #26323: URL: https://github.com/apache/superset/issues/26323#issuecomment-1866984781
@yousoph we discussed this at length today with @michael-s-molina. In summary, I feel that outside of [RTL](https://en.wikipedia.org/wiki/Right-to-left_script), inverting a scalar x-axis doesn't really make sense, and is not something we've ever supported: temporal charts have always been assumed to flow from the left to the right. While we could consider adding a control for reversing x-axis for temporal and numerical x-axes*, sorting them by any other column doesn't really make sense, unless assuming them to be categorical first. So in this sense, the x-axis sorting control was not supposed to be present for numerical x-axes. This is, IMO, a bug. To address this, without breaking conflicting functionality in the 2.x and 3.x branches, I propose the following: - If the x-axis is temporal or numerical, we expose a new control underneath the x-axis control called "Force categorical" that defaults to false. By default, numerical charts render with the numerical x-axis, similar to how it is in the 2.x releases. When this control is set to true, the x-axis becomes categorical, which it the behavior in 3.x releases. - Setting this control to true also exposes the old sorting control, making it possible to specify both the sort column and direction. With regard to introducing RTL support, I think it's a great idea, but not something we probably can't take on right now, and is something that would likely require a huge overhaul of our UI. \* If we really want to support inverted scalar axes, that's already [supported in ECharts](https://echarts.apache.org/en/option.html#xAxis.inverse). So it's really just a question of adding yet another control for it. However, given how cluttered our control panels already are, and how niche this requirement likely is, I'm not sure this is something we should do before we thoroughly plan for official RTL support. FYI @sfirke @rusackas -- 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]
