GeoBlazor Pro
dymaptic.GeoBlazor.Pro
dymaptic.GeoBlazor.Pro.Components
PieChartGenerator Class
This object contains a helper method for generating a pie chart for every feature.
ArcGIS Maps SDK for JavaScript
public class PieChartGenerator : dymaptic.GeoBlazor.Pro.Model.ProLogicComponent
Inheritance System.Object 🡒 dymaptic.GeoBlazor.Core.Model.LogicComponent 🡒 ProLogicComponent 🡒 PieChartGenerator
Constructors
PieChartGenerator(AuthenticationManager, JsModuleManager, IAppValidator, IJSRuntime) Constructor
Constructor for use by Dependency Injection. Use AddGeoBlazorPro(this IServiceCollection, IConfiguration) in your startup code.
public PieChartGenerator(dymaptic.GeoBlazor.Core.Model.AuthenticationManager authenticationManager, dymaptic.GeoBlazor.Core.JsModuleManager jsModuleManager, dymaptic.GeoBlazor.Core.IAppValidator appValidator, Microsoft.JSInterop.IJSRuntime jsRuntime);
Parameters
authenticationManager
dymaptic.GeoBlazor.Core.Model.AuthenticationManager
jsModuleManager
dymaptic.GeoBlazor.Core.JsModuleManager
appValidator
dymaptic.GeoBlazor.Core.IAppValidator
jsRuntime
Microsoft.JSInterop.IJSRuntime
Methods
PieChartGenerator.CreateRenderer(Layer, Guid, IReadOnlyCollection, Nullable, Nullable, Nullable, Nullable, VisualVariableLegendOptions, PieChartScheme, Nullable) Method
Generates a PieChartRenderer based on a set of numeric fields.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Results.PieChartRendererResult> CreateRenderer(dymaptic.GeoBlazor.Core.Components.Layers.Layer layer, System.Guid viewId, System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Pro.Components.AttributeColorInfo> attributes, System.Nullable<dymaptic.GeoBlazor.Pro.Enums.PieChartShape> shape, System.Nullable<bool> includeSizeVariable, System.Nullable<bool> outlineOptimizationEnabled, System.Nullable<bool> sizeOptimizationEnabled, dymaptic.GeoBlazor.Core.Components.VisualVariableLegendOptions? legendOptions, dymaptic.GeoBlazor.Pro.Model.PieChartScheme? pieChartScheme, System.Nullable<bool> forBinning);
Parameters
layer
dymaptic.GeoBlazor.Core.Components.Layers.Layer
The layer for which the visualization is generated.
viewId
System.Guid
The view instance in which the visualization will be rendered.
attributes
System.Collections.Generic.IReadOnlyCollection<AttributeColorInfo>
A set of complementary numeric fields/expressions used to create the charts. For example, if creating an election map, you would indicate the name of each field representing the candidate or political party where their total counts are stored.
shape
System.Nullable<PieChartShape>
Default Value: “pie”
Determines whether to create a pie chart or a donut chart.
includeSizeVariable
System.Nullable<System.Boolean>
Indicates whether to include data-driven size in the final renderer. If true, features will be assigned a sized based on the sum of all values in the attributes param. Features with small total counts will be sized with small charts and features with large total counts will be sized with large charts. Enabling this option is good for visualizing how influential a particular feature is compared to the dataset as a whole. It removes bias introduced by features with large geographic areas, but relatively small data values.
outlineOptimizationEnabled
System.Nullable<System.Boolean>
Default Value: false
Only for polygon layers. Indicates whether the polygon’s background fill symbol outline width should vary based on view scale.
sizeOptimizationEnabled
System.Nullable<System.Boolean>
Default Value: false
Indicates whether chart sizes should vary based on view scale.
legendOptions
dymaptic.GeoBlazor.Core.Components.VisualVariableLegendOptions
Provides options for modifying Legend properties describing the visualization.
pieChartScheme
PieChartScheme
In authoring apps, the user may select a pre-defined color scheme. Pass the scheme object to this property to avoid getting one based on the background of the view.
forBinning
System.Nullable<System.Boolean>
Indicates whether the generated renderer is for a binning visualization. If true, then the input field(s) in this method should refer to aggregate fields defined in the featureReduction property of the layer.
Returns
System.Threading.Tasks.Task<PieChartRendererResult>
PieChartGenerator.CreateRendererForClustering(Layer, Nullable, Nullable, VisualVariableLegendOptions) Method
Generates a PieChartRenderer to use for a FeatureReductionCluster visualization based off an input layer’s UniqueValueRenderer or ClassBreaksRenderer. This method also generates aggregate fields that must be provided to the FeatureReductionCluster object to properly render.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Results.PieChartClusterRendererResult> CreateRendererForClustering(dymaptic.GeoBlazor.Core.Components.Layers.Layer layer, System.Nullable<dymaptic.GeoBlazor.Pro.Enums.PieChartShape> shape=null, System.Nullable<bool> defaultSymbolEnabled=null, dymaptic.GeoBlazor.Core.Components.VisualVariableLegendOptions? legendOptions=null);
Parameters
layer
dymaptic.GeoBlazor.Core.Components.Layers.Layer
The layer for which the visualization is generated. To use the output cluster renderer, you must first enable clustering on the layer.
shape
System.Nullable<PieChartShape>
Default Value: “pie”
Determines whether to create a pie chart or a donut chart.
defaultSymbolEnabled
System.Nullable<System.Boolean>
Default Value: true
Includes the defaultSymbol defined in the input layer’s renderer in the output pie chart renderer.
legendOptions
dymaptic.GeoBlazor.Core.Components.VisualVariableLegendOptions
Provides options for modifying Legend properties describing the visualization.