@quantumwake/terminal-ux-dashboard-components 0.1.26 → 0.1.28

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.
package/dist/index.cjs CHANGED
@@ -674,16 +674,14 @@ function LineView({ records, xColumn, yColumn, data: presetData, style }) {
674
674
  const { frameClass, frameStyle, margin } = chartSizing(style, { top: 20, right: 20, bottom: 60, left: 60 });
675
675
  const colorById = new Map(data.map((serie, i) => [
676
676
  serie.id,
677
- s.seriesColors.length || data.length > 1 ? seriesColor(i, s) : "rgba(96, 165, 250, 0.9)"
677
+ serie.color ?? (s.seriesColors.length || data.length > 1 ? seriesColor(i, s) : "rgba(96, 165, 250, 0.9)")
678
678
  ]));
679
679
  const longest = data.reduce((a, b) => b.data.length > a.data.length ? b : a, { id: "", data: [] });
680
680
  const tickValues = thinTicks(longest.data.map((d) => d.x), s.maxXTicks);
681
- const ceilRef = react.useRef(0);
682
681
  let yScale = { type: "linear", min: "auto", max: "auto" };
683
682
  if (s.yFromZero) {
684
- const dataMax = Math.max(0, ...data.flatMap((serie) => serie.data.map((d) => Math.max(d.y, d.hi ?? d.y))));
685
- ceilRef.current = Math.max(ceilRef.current, niceCeil(dataMax));
686
- yScale = { type: "linear", min: 0, max: ceilRef.current };
683
+ const dataMax = Math.max(0, ...data.flatMap((serie) => serie.data.map((d) => Math.max(d.y ?? 0, d.hi ?? d.y ?? 0))));
684
+ yScale = { type: "linear", min: 0, max: niceCeil(dataMax) };
687
685
  }
688
686
  const bandedIds = new Set(data.filter((serie) => serie.data.some((d) => d.lo != null)).map((serie) => serie.id));
689
687
  const bandsLayer = ({ series, yScale: yScale2, lineGenerator }) => /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: series.map((serie) => {