foregroundStyle(for:)
Returns the foreground style for the given data value. Returns nil if the foreground style scale is unavailable, or the value is invalid.
Declaration
func foregroundStyle<P>(for value: P) -> AnyShapeStyle? where P : PlottableParameters
- value:
The data value.
Return Value
The foreground style corresponding to the data value, or nil if the data value is incompatible with the chart.