-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stacked line chart functionality
- Loading branch information
1 parent
b5a3459
commit 36ba734
Showing
8 changed files
with
191 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ContextResourceData, PrometheusQueryRangeResultValue } from '~/types'; | ||
|
||
export type TranslatePoint = (line: GraphMetricPoint) => GraphMetricPoint; | ||
|
||
type MetricChartLineBase = { | ||
metric: ContextResourceData<PrometheusQueryRangeResultValue>; | ||
translatePoint?: TranslatePoint; | ||
}; | ||
export type NamedMetricChartLine = MetricChartLineBase & { | ||
name: string; | ||
}; | ||
export type UnnamedMetricChartLine = MetricChartLineBase & { | ||
/** Assumes chart title */ | ||
name?: string; | ||
}; | ||
export type MetricChartLine = UnnamedMetricChartLine | NamedMetricChartLine[]; | ||
|
||
export type GraphMetricPoint = { | ||
x: number; | ||
y: number; | ||
name: string; | ||
}; | ||
export type GraphMetricLine = GraphMetricPoint[]; | ||
|
||
export type ProcessedMetrics = { | ||
data: GraphMetricLine[]; | ||
maxYValue: number; | ||
}; |
Oops, something went wrong.