dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components
ColorVariable Class
The color visual variable is used to visualize features along a continuous color ramp based
on the values of a numeric attribute field or an expression.
ArcGIS Maps SDK for JavaScript
public class ColorVariable : dymaptic.GeoBlazor.Core.Components.VisualVariable,
dymaptic.GeoBlazor.Core.Interfaces.IMapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 VisualVariable 🡒 ColorVariable
Implements IMapComponent
Constructors
ColorVariable() Constructor
Parameterless constructor for use as a Razor Component.
public ColorVariable();
ColorVariable(string, string, IReadOnlyList, VisualVariableLegendOptions, string, string) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public ColorVariable(string field, string? normalizationField=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ColorStop>? stops=null, dymaptic.GeoBlazor.Core.Components.VisualVariableLegendOptions? legendOptions=null, string? valueExpression=null, string? valueExpressionTitle=null);
Parameters
field
System.String
The name of the numeric attribute field that contains the data
values used to determine the color/opacity/size/rotation of each feature.
ArcGIS Maps SDK for JavaScript
normalizationField
System.String
Name of the numeric attribute field by which to normalize
the data.
ArcGIS Maps SDK for JavaScript
stops
System.Collections.Generic.IReadOnlyList<ColorStop>
An array of sequential objects, or stops, that defines a continuous color ramp.
ArcGIS Maps SDK for JavaScript
legendOptions
VisualVariableLegendOptions
An object providing options for displaying the visual variable in
the Legend.
ArcGIS Maps SDK for JavaScript
valueExpression
System.String
An Arcade expression following the specification
defined by the Arcade Visualization Profile.
ArcGIS Maps SDK for JavaScript
valueExpressionTitle
System.String
The title identifying and describing the associated
Arcade expression as defined in the valueExpression property.
ArcGIS Maps SDK for JavaScript
Properties
ColorVariable.NormalizationField Property
Name of the numeric attribute field by which to normalize the data. If this field is used, then the values in stops should be normalized as percentages or ratios.
public string? NormalizationField { get; set; }
Property Value
ColorVariable.Stops Property
An array of sequential objects, or stops, that defines a continuous color ramp.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ColorStop>? Stops { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<ColorStop>
ColorVariable.Type Property
The visual variable type.
public override dymaptic.GeoBlazor.Core.Enums.VisualVariableType Type { get; }
Property Value
Methods
ColorVariable.AddToStops(ColorStop[]) Method
Asynchronously adds elements to the Stops property.
public System.Threading.Tasks.Task AddToStops(params dymaptic.GeoBlazor.Core.Components.ColorStop[] values);
Parameters
The elements to add.
Returns
ColorVariable.GetNormalizationField() Method
Asynchronously retrieve the current value of the NormalizationField property.
public System.Threading.Tasks.Task<string?> GetNormalizationField();
Returns
System.Threading.Tasks.Task<System.String>
ColorVariable.GetStops() Method
Asynchronously retrieve the current value of the Stops property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ColorStop>?> GetStops();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<ColorStop>>
ColorVariable.RegisterChildComponent(MapComponent) Method
Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with its parent.
public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The calling, child component to register
Returns
Exceptions
InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.
ColorVariable.RemoveFromStops(ColorStop[]) Method
Asynchronously remove an element from the Stops property.
public System.Threading.Tasks.Task RemoveFromStops(params dymaptic.GeoBlazor.Core.Components.ColorStop[] values);
Parameters
The elements to remove.
Returns
ColorVariable.SetNormalizationField(string) Method
Asynchronously set the value of the NormalizationField property after render.
public System.Threading.Tasks.Task SetNormalizationField(string? value);
Parameters
value
System.String
The value to set.
Returns
ColorVariable.SetStops(IReadOnlyList) Method
Asynchronously set the value of the Stops property after render.
public System.Threading.Tasks.Task SetStops(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Components.ColorStop>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<ColorStop>
The value to set.
Returns
ColorVariable.UnregisterChildComponent(MapComponent) Method
Undoes the “Registration” of a child with its parent.
public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);
Parameters
child
MapComponent
The child to unregister
Returns
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.
ColorVariable.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()