refactor the bin level over time
the auto inventory stuff pulls from the measurements and the manual/hybrid stuff pulls from the history, the auto will also create a new chart underneath for the bin modes
This commit is contained in:
parent
54a826bc2d
commit
67cafbe2ed
2 changed files with 133 additions and 96 deletions
|
|
@ -15,6 +15,7 @@ import {
|
|||
export interface BarData {
|
||||
timestamp: number;
|
||||
value: number;
|
||||
fill?: string;
|
||||
}
|
||||
|
||||
export interface RefArea {
|
||||
|
|
@ -36,8 +37,9 @@ export interface AxisLabel {
|
|||
|
||||
interface Props {
|
||||
data: BarData[];
|
||||
barColour: string;
|
||||
barColour?: string;
|
||||
refAreas?: RefArea[];
|
||||
hideYAxis?: boolean;
|
||||
yMin?: number;
|
||||
yMax?: number;
|
||||
graphLegend?: JSX.Element;
|
||||
|
|
@ -60,6 +62,7 @@ export default function BarGraph(props: Props) {
|
|||
data,
|
||||
barColour,
|
||||
refAreas,
|
||||
hideYAxis,
|
||||
yMin,
|
||||
yMax,
|
||||
graphLegend,
|
||||
|
|
@ -103,6 +106,7 @@ export default function BarGraph(props: Props) {
|
|||
{graphLegend}
|
||||
<YAxis
|
||||
domain={[yMin ?? "dataMin", yMax ?? "auto"]}
|
||||
hide={hideYAxis}
|
||||
interval="preserveStartEnd"
|
||||
scale={"linear"}
|
||||
label={yLabel}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue