PieChart: Make pie gradient more subtle to match other charts (#36961)

* change pie gradient to from colors

* increase label contrast

* Revert "change pie gradient to from colors"

This reverts commit 70d07d8b8e.

* reduce spin values
This commit is contained in:
nikki-kiga 2021-07-21 08:50:38 -07:00 committed by GitHub
parent cac4b4b443
commit 1efa5f51cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,14 +346,14 @@ 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)
.spin(4)
.toRgbString();
}
function getGradientColorTo(color: string, theme: GrafanaTheme2) {
return tinycolor(color)
.darken(10 * (theme.isDark ? 1 : -0.7))
.spin(-8)
.spin(-4)
.toRgbString();
}