Class GradientTheme
The GradientTheme class defines a gradient color thematic rendering of features based by a numeric attribute.
Inherited Members
Namespace: Mapsui.Styles.Thematics
Assembly: Mapsui.dll
Syntax
public class GradientTheme : BaseStyle, IThemeStyle, IStyle
Constructors
| Edit this page View SourceGradientTheme(string, double, double, IStyle, IStyle)
Initializes a new instance of the GradientTheme class
Declaration
public GradientTheme(string columnName, double minValue, double maxValue, IStyle minStyle, IStyle maxStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| string | columnName | Name of column to extract the attribute |
| double | minValue | Minimum value |
| double | maxValue | Maximum value |
| IStyle | minStyle | Color for minimum value |
| IStyle | maxStyle | Color for maximum value |
Properties
| Edit this page View SourceColumnName
Gets or sets the column name from where to get the attribute value
Declaration
public string ColumnName { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
FillColorBlend
Gets or sets the ColorBlend used as Fill
Declaration
public ColorBlend? FillColorBlend { get; init; }
Property Value
| Type | Description |
|---|---|
| ColorBlend |
LineColorBlend
Gets or sets the ColorBlend used on lines
Declaration
public ColorBlend? LineColorBlend { get; init; }
Property Value
| Type | Description |
|---|---|
| ColorBlend |
Max
Gets or sets the maximum value of the gradient
Declaration
public double Max { get; init; }
Property Value
| Type | Description |
|---|---|
| double |
MaxStyle
Gets or sets the style for the maximum value
Declaration
public IStyle MaxStyle { get; init; }
Property Value
| Type | Description |
|---|---|
| IStyle |
Min
Gets or sets the minimum value of the gradient
Declaration
public double Min { get; init; }
Property Value
| Type | Description |
|---|---|
| double |
MinStyle
Gets or sets the style for the minimum value
Declaration
public IStyle MinStyle { get; init; }
Property Value
| Type | Description |
|---|---|
| IStyle |
TextColorBlend
Gets or sets the ColorBlend used on labels
Declaration
public ColorBlend? TextColorBlend { get; init; }
Property Value
| Type | Description |
|---|---|
| ColorBlend |
Methods
| Edit this page View SourceGetStyle(IFeature, Viewport)
Returns the style based on a numeric DataColumn, where style properties are linearly interpolated between max and min values.
Declaration
public IStyle? GetStyle(IFeature row, Viewport _)
Parameters
| Type | Name | Description |
|---|---|---|
| IFeature | row | Feature |
| Viewport | _ |
Returns
| Type | Description |
|---|---|
| IStyle | A Style calculated by a linear interpolation between the min/max styles |