mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Legends: Refactoring and rewrites of legend components to simplify components & reuse (#30165)
* Legends: Refactoring and rewrites of legend components to simplify components & reuse * Removed onSeriesAxisToggle * More removal of onSeriesAxisToggle and storybook improvements * Added story with legend values * Move table legend styles from inline to defined in stylesFactory * Update styles * Change to circle * Updated style to fat line * Rename to VizLegend * More renamed and fixes / polish * Removed imports * Minor change * Updates * Updates
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { LegendOptions, GraphTooltipOptions, LegendDisplayMode } from '@grafana/ui';
|
||||
import { GraphTooltipOptions, LegendDisplayMode, LegendPlacement } from '@grafana/ui';
|
||||
import { YAxis } from '@grafana/data';
|
||||
|
||||
export interface SeriesOptions {
|
||||
@@ -14,7 +14,10 @@ export interface GraphOptions {
|
||||
|
||||
export interface Options {
|
||||
graph: GraphOptions;
|
||||
legend: LegendOptions & GraphLegendEditorLegendOptions;
|
||||
legend: {
|
||||
displayMode: LegendDisplayMode;
|
||||
placement: LegendPlacement;
|
||||
};
|
||||
series: {
|
||||
[alias: string]: SeriesOptions;
|
||||
};
|
||||
@@ -35,7 +38,9 @@ export const defaults: Options = {
|
||||
tooltipOptions: { mode: 'single' },
|
||||
};
|
||||
|
||||
export interface GraphLegendEditorLegendOptions extends LegendOptions {
|
||||
export interface GraphLegendEditorLegendOptions {
|
||||
displayMode: LegendDisplayMode;
|
||||
placement: LegendPlacement;
|
||||
stats?: string[];
|
||||
decimals?: number;
|
||||
sortBy?: string;
|
||||
|
||||
Reference in New Issue
Block a user