Let a dashboard be read against runs instead of the live engine
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { slotsFor } from "@/components/Common/UplotChart"
|
||||
import { useLiveValues } from "@/components/Flow/liveStore"
|
||||
import { useBoundValues } from "./dataContext"
|
||||
import { usePalette } from "./settings"
|
||||
import { useUi } from "./ui"
|
||||
import { rowsOf } from "./ui/core/config"
|
||||
@@ -24,7 +24,7 @@ import type { WidgetProps } from "./widgets"
|
||||
export function BarWidget({ widget }: WidgetProps) {
|
||||
const { Bar } = useUi()
|
||||
const rows = rowsOf(widget).filter((row) => row.message)
|
||||
const live = useLiveValues(rows.map((row) => row.message as string))
|
||||
const live = useBoundValues(rows.map((row) => row.message as string))
|
||||
// The dashboard's own data colours, in the order a chart would take them, so
|
||||
// a bar and a chart of the same readings agree about which line is which.
|
||||
const colors = slotsFor(rows.length, usePalette())
|
||||
|
||||
Reference in New Issue
Block a user