From 75bd726f150d0a92b9bc959c71c775c9529415d3 Mon Sep 17 00:00:00 2001 From: Cameron DeCoster Date: Mon, 6 Jul 2026 17:15:25 -0600 Subject: [PATCH] fix: Handle NaN values in sortAxisCategoriesByValue conditional check --- src/plots/plots.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plots/plots.js b/src/plots/plots.js index 4c61a043688..53b24239910 100644 --- a/src/plots/plots.js +++ b/src/plots/plots.js @@ -3193,8 +3193,7 @@ function sortAxisCategoriesByValue(axList, gd) { if(catIndex === undefined) catIndex = cdi[axLetter]; // Skip points whose position is not a valid category - // (e.g. a null/NaN coordinate maps to BADNUM) - if (catIndex == null || catIndex < 0) continue; + if (isNaN(catIndex) || catIndex < 0) continue; value = cdi.s; if(value === undefined) value = cdi.v;