You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
892 B
44 lines
892 B
import { TimeSerie, Options } from '@chartwerk/core'; |
|
|
|
export enum Stat { |
|
CURRENT = 'current', |
|
MIN = 'min', |
|
MAX = 'max', |
|
TOTAL = 'total' |
|
} |
|
|
|
export type Stop = { |
|
color: string, |
|
value: number | null |
|
}; |
|
|
|
export type ValueFormatter = (value: number) => string; |
|
|
|
export type GaugeTimeSerie = TimeSerie; |
|
|
|
export type IconConfig = { |
|
src: string, |
|
position: IconPosition, |
|
size: number |
|
} |
|
export enum IconPosition { |
|
LEFT = 'left', |
|
MIDDLE = 'middle', |
|
RIGHT = 'right' |
|
} |
|
|
|
export type GaugeOptionsParams = { |
|
innerRadius: number; |
|
outerRadius: number; |
|
// TODO: minValue |
|
maxValue: number; |
|
minValue: number; |
|
stops: { color: string , value: number }[]; |
|
defaultColor: string; |
|
stat: Stat; |
|
valueFormatter: ValueFormatter; |
|
icons: IconConfig[]; |
|
valueFontSize: number; |
|
valueArcBackgroundColor: string; |
|
} |
|
export type GaugeOptions = Options & Partial<GaugeOptionsParams>;
|
|
|