You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix gr.NativePlot sorting of labels as default behaviour (#10953)
* Fix#10764: Automatic sorting of labels in plots
Originally, the bug appeared to be isolated to
gr.BarPlot, but it turns out that it affects all
gr.NativePlot components, including BarPlot,
LinePlot, and ScatterPlot.
Although the data does not seem sorted in the
program's flow, it gets sorted when the Svelte
file is rendered. This issue occurs because the
reformat_sort function in index.svelte of
NativePlot returns undefined when sort is not
specified, which, during compilation, is treated
as void 0. This implicitly triggers default
sorting. To resolve this, I changed undefined to
null, ensuring that the compiled code handles it
as null, resulting in unsorted data being
displayed in the browser.
* add changeset
---------
Co-authored-by: gradio-pr-bot <[email protected]>
0 commit comments