mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 04:04:00 -06:00
change pie gradient to from colors
This commit is contained in:
parent
f32d200fc0
commit
70d07d8b8e
@ -30,6 +30,7 @@ import { css } from '@emotion/css';
|
||||
import { useComponentInstanceId } from '@grafana/ui/src/utils/useComponetInstanceId';
|
||||
import { getTooltipContainerStyles } from '@grafana/ui/src/themes/mixins';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { darken, lighten } from '@grafana/data/src/themes/colorManipulator';
|
||||
|
||||
/**
|
||||
* @beta
|
||||
@ -344,17 +345,11 @@ function getLabelPos(arc: PieArcDatum<FieldDisplay>, outerRadius: number, innerR
|
||||
}
|
||||
|
||||
function getGradientColorFrom(color: string, theme: GrafanaTheme2) {
|
||||
return tinycolor(color)
|
||||
.darken(20 * (theme.isDark ? 1 : -0.7))
|
||||
.spin(8)
|
||||
.toRgbString();
|
||||
return theme.isDark ? darken(color, 0.3) : lighten(color, 0.3);
|
||||
}
|
||||
|
||||
function getGradientColorTo(color: string, theme: GrafanaTheme2) {
|
||||
return tinycolor(color)
|
||||
.darken(10 * (theme.isDark ? 1 : -0.7))
|
||||
.spin(-8)
|
||||
.toRgbString();
|
||||
return theme.isDark ? darken(color, 0.1) : lighten(color, 0.1);
|
||||
}
|
||||
|
||||
interface PieLayout {
|
||||
|
Loading…
Reference in New Issue
Block a user