@sybilion/uilib 1.3.101 → 1.3.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -114,7 +114,8 @@ function DriversComparisonChart({ payload, datasetHistorical = [], loading = fal
114
114
  const tableSeriesRows = useMemo(() => {
115
115
  if (sortedDriversWithData.length === 0)
116
116
  return [];
117
- return sortedDriversWithData.map((driver, idx) => {
117
+ return sortedDriversWithData
118
+ .map((driver, idx) => {
118
119
  const raw = driver.importance;
119
120
  const importance = typeof raw === 'number' && Number.isFinite(raw) ? raw : null;
120
121
  const lagSource = originalDriversById.get(String(driver.id)) ?? driver;
@@ -125,7 +126,8 @@ function DriversComparisonChart({ payload, datasetHistorical = [], loading = fal
125
126
  importance,
126
127
  lag: getLagDisplayForView(resolveDriverLagLabel(lagSource), viewTab),
127
128
  };
128
- });
129
+ })
130
+ .sort((a, b) => b.importance - a.importance);
129
131
  }, [originalDriversById, sortedDriversWithData, viewTab]);
130
132
  const seriesInitKeyResolved = seriesInitKey ?? `${tableSeriesRows.map(r => r.id).join(',') || 'none'}`;
131
133
  const backtestsSeriesInitKeyRef = useRef('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sybilion/uilib",
3
- "version": "1.3.101",
3
+ "version": "1.3.102",
4
4
  "description": "Sybilion Design System — React UI components (Webpack + Stylus)",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -199,19 +199,21 @@ export function DriversComparisonChart({
199
199
 
200
200
  const tableSeriesRows = useMemo(() => {
201
201
  if (sortedDriversWithData.length === 0) return [];
202
- return sortedDriversWithData.map((driver, idx) => {
203
- const raw = driver.importance;
204
- const importance =
205
- typeof raw === 'number' && Number.isFinite(raw) ? raw : null;
206
- const lagSource = originalDriversById.get(String(driver.id)) ?? driver;
207
- return {
208
- id: DRIVER_FORECAST_ID_BASE + idx,
209
- name: driver.name || String(driver.id),
210
- color: getForecastColor(idx + 1),
211
- importance,
212
- lag: getLagDisplayForView(resolveDriverLagLabel(lagSource), viewTab),
213
- };
214
- });
202
+ return sortedDriversWithData
203
+ .map((driver, idx) => {
204
+ const raw = driver.importance;
205
+ const importance =
206
+ typeof raw === 'number' && Number.isFinite(raw) ? raw : null;
207
+ const lagSource = originalDriversById.get(String(driver.id)) ?? driver;
208
+ return {
209
+ id: DRIVER_FORECAST_ID_BASE + idx,
210
+ name: driver.name || String(driver.id),
211
+ color: getForecastColor(idx + 1),
212
+ importance,
213
+ lag: getLagDisplayForView(resolveDriverLagLabel(lagSource), viewTab),
214
+ };
215
+ })
216
+ .sort((a, b) => b.importance - a.importance);
215
217
  }, [originalDriversById, sortedDriversWithData, viewTab]);
216
218
 
217
219
  const seriesInitKeyResolved =