-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2826 from andrewbaldwin44/feature/dashboard-as-a-…
…module-2 Improve Echarts and Expose Line and Axis Configuration
- Loading branch information
Showing
6 changed files
with
245 additions
and
242 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
locust/webui/src/components/LineChart/LineChart.constants.ts
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,14 @@ | ||
export const CHART_THEME = { | ||
DARK: { | ||
textColor: '#b3c3bc', | ||
axisColor: '#5b6f66', | ||
backgroundColor: '#27272a', | ||
splitLine: '#4c4c52', | ||
}, | ||
LIGHT: { | ||
textColor: '#000', | ||
axisColor: '#000', | ||
backgroundColor: '#fff', | ||
splitLine: '#ddd', | ||
}, | ||
}; |
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,29 @@ | ||
export interface ILine<ChartType> { | ||
name: string; | ||
key: keyof ChartType; | ||
stack?: string; | ||
areaStyle?: { [key: string]: any }; | ||
yAxisIndex?: number; | ||
} | ||
|
||
export interface ILineChart<ChartType> { | ||
charts: ChartType; | ||
title: string; | ||
lines: ILine<ChartType>[]; | ||
colors?: string[]; | ||
chartValueFormatter?: (value: string | number | string[] | number[]) => string | number; | ||
splitAxis?: boolean; | ||
yAxisLabels?: string | [string, string]; | ||
} | ||
|
||
export interface ILineChartZoomEvent { | ||
batch?: { start: number; end: number }[]; | ||
} | ||
|
||
export interface ILineChartTimeAxis { | ||
time: string[]; | ||
} | ||
|
||
export interface ILineChartMarkers { | ||
markers?: string[]; | ||
} |
Oops, something went wrong.