Skip to content

ChartGradientMapping

StructChartGuruChartGuru
public struct ChartGradientMapping

A series or category key mapped to a gradient, as in .chartForegroundStyleScale(["Key": .linearGradient(...)]). The gradient is drawn across every mark of that key. A color mapped to the same key stays on the marks: bars and areas still draw the gradient, lines and radar polygons draw the color.

public string Key

Returns

System.String

public LinearGradientStyle Gradient

Returns

ChartGuru.LinearGradientStyle

ChartGradientMapping(string, LinearGradientStyle)

Section titled “ChartGradientMapping(string, LinearGradientStyle)”
public ChartGradientMapping(string key, LinearGradientStyle gradient)

Maps a series or category key to the gradient drawn across its marks.

Parameters

Name Type
key System.String
gradient ChartGuru.LinearGradientStyle