mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
[bars] fix sort numeric bar on x axis (#2812)
This commit is contained in:
committed by
GitHub
parent
66403f1876
commit
74086dae2b
@@ -203,3 +203,16 @@ export function initJQueryAjax() {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function tryNumify(s) {
|
||||
// Attempts casting to float, returns string when failing
|
||||
try {
|
||||
const parsed = parseFloat(s);
|
||||
if (parsed) {
|
||||
return parsed;
|
||||
}
|
||||
} catch (e) {
|
||||
// pass
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user