gradio
ede74283 - Fix gr.NativePlot sorting of labels as default behaviour (#10953)

Commit
251 days ago
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 <gradio-pr-bot@users.noreply.github.com>
Author
Parents
Loading