Chart API Reference
This page documents every public class, interface, and enum in the PowerPortalsPro charting library.
Components
The Blazor components that render charts.
FluentUIChart
A theme-aware wrapper around the base Chart component. Reads colors from the active Fluent UI design tokens, auto-fills dataset colors from a Fluent-derived palette, and re-themes the chart when the user toggles between light and dark mode.
FluentUIChart Class
Parameters
Name | Type | Default | Description |
|---|---|---|---|
Datasets | List<ChartDataset> | Gets or sets the datasets to plot. Any dataset that leaves ChartDataset.BackgroundColor or ChartDataset.BorderColor null will be auto-filled from the active Fluent palette. | |
EnableAnimation | bool | True | Whether chart animations are enabled. Defaults to |
Height | string? | 400px | Gets or sets the optional CSS height applied to the chart container. Defaults to |
Labels | List<string> | Gets or sets the category labels rendered along the chart's primary axis. | |
LegendPosition | ChartLegendPosition? | Legend placement relative to the chart area, or ChartLegendPosition.Hidden to hide it entirely. When ChartLegendPosition.Top) is used. | |
Orientation | ChartOrientation? | Chart orientation. When ChartOrientation.Horizontal, categories appear on the Y axis and values on the X axis. Funnel charts default to horizontal for a top-down funnel. When | |
ShowBorder | bool | True | Whether to wrap the chart in a themed border with rounded corners. Defaults to |
Stacked | bool | False | Whether to stack datasets on top of each other rather than side-by-side. Applies to bar and line charts. |
Title | string? | Chart title displayed above the chart. When null, no title is shown. | |
Type | ChartType | Bar | Gets or sets the chart type to render (for example ChartType.Bar, ChartType.Line, ChartType.Pie, ChartType.Doughnut). |
Width | string? | Gets or sets the optional CSS width applied to the chart container. | |
XAxisPrefix | string? | Optional string prepended to each X-axis tick label. | |
XAxisSuffix | string? | Optional string appended to each X-axis tick label. | |
YAxisPrefix | string? | Optional string prepended to each Y-axis tick label and tooltip value (for example | |
YAxisSuffix | string? | Optional string appended to each Y-axis tick label and tooltip value (for example |
DatasetsChartDataset.BackgroundColor or ChartDataset.BorderColor null will be auto-filled from the active Fluent palette.EnableAnimationHeightLabelsLegendPositionChartLegendPosition.Hidden to hide it entirely. When ChartLegendPosition.Top) is used.OrientationChartOrientation.Horizontal, categories appear on the Y axis and values on the X axis. Funnel charts default to horizontal for a top-down funnel. When ShowBorderStackedTitleTypeChartType.Bar, ChartType.Line, ChartType.Pie, ChartType.Doughnut).WidthXAxisPrefixXAxisSuffixYAxisPrefixYAxisSuffixEvents
Name | Type | Description |
|---|---|---|
OnElementClick | EventCallback<ChartClickEventArgs> | Raised when the user clicks on a rendered chart element (a bar, slice, point, etc.). Forwarded to the underlying Components.Chart; clicks on the chart background are ignored. |
OnElementClickComponents.Chart; clicks on the chart background are ignored.Methods
Name | Parameters | Type | Description |
|---|---|---|---|
ExportAsImageAsync | Task<string> | Exports the current chart as a PNG image and returns the data as a Base64-encoded data URI (e.g. |
ExportAsImageAsyncDataverseChart
A convenience component that wraps FluentUIChart and owns the data-loading lifecycle. Accepts a DataverseChartDataSource, handles loading state, error display, and provides an optional refresh button.
DataverseChart Class
Parameters
Name | Type | Default | Description |
|---|---|---|---|
DefaultViewId | Guid? | Optional default view ID to pre-select in the view dropdown. If not set, the first view in DataverseChart.ViewIds (or the table's default view) is selected. | |
EnableAnimation | bool | True | Whether chart animations are enabled. Defaults to |
Height | string? | 400px | Optional CSS height applied to the entire component (including the view selector dropdown and themed border, when shown). The internal chart fills whatever space remains after the toolbar and selector. Defaults to |
LegendPosition | ChartLegendPosition? | Legend placement relative to the chart area, or ChartLegendPosition.Hidden to hide it entirely. When ChartLegendPosition.Top) is used. | |
LinkedGrid | Func<GridBase>? | Optional accessor that returns the grid whose filters should drive this chart. Use a lambda ( Components.GridBase parameter would be baked in as | |
Orientation | ChartOrientation? | Chart orientation. Funnel charts default to ChartOrientation.Horizontal for a top-down funnel. When | |
ShowBorder | bool | True | Whether to wrap the chart in a themed border with rounded corners. Defaults to |
ShowExportButton | bool | True | Whether to show a download button that exports the chart as a PNG image. Defaults to |
ShowRefreshButton | bool | True | Whether to show a refresh button in the top-right corner of the chart. Defaults to |
Source | DataverseChartDataSource | The data source that provides the chart data. Call sites configure this (either a Components.DataverseChartDataSource, Components.AggregateDataverseChartDataSource, Components.ViewDataverseChartDataSource, etc.) and the component handles the Services.IPowerPortalsProService) lifecycle, loading state, and error display. | |
Stacked | bool | False | Whether to stack datasets on top of each other rather than side-by-side. |
Title | string? | Chart title displayed above the chart. When null, no title is shown. | |
Type | ChartType | Bar | The chart type to render. |
ViewIds | List<Guid>? | Optional list of Dataverse view IDs to display in a dropdown above the chart. When the user selects a view, its filter conditions are merged into the data source and the chart reloads. Works with Components.AggregateDataverseChartDataSource and Components.ViewDataverseChartDataSource. | |
Width | string? | Optional CSS width applied to the chart container. | |
XAxisPrefix | string? | Optional string prepended to each X-axis tick label. | |
XAxisSuffix | string? | Optional string appended to each X-axis tick label. | |
YAxisPrefix | string? | Optional string prepended to each Y-axis tick label and tooltip value (e.g. | |
YAxisSuffix | string? | Optional string appended to each Y-axis tick label and tooltip value (e.g. |
DefaultViewIdDataverseChart.ViewIds (or the table's default view) is selected.EnableAnimationHeightLegendPositionChartLegendPosition.Hidden to hide it entirely. When ChartLegendPosition.Top) is used.LinkedGridComponents.GridBase parameter would be baked in as OrientationChartOrientation.Horizontal for a top-down funnel. When ShowBorderShowExportButtonShowRefreshButtonSourceComponents.DataverseChartDataSource, Components.AggregateDataverseChartDataSource, Components.ViewDataverseChartDataSource, etc.) and the component handles the Services.IPowerPortalsProService) lifecycle, loading state, and error display.StackedTitleTypeViewIdsComponents.AggregateDataverseChartDataSource and Components.ViewDataverseChartDataSource.WidthXAxisPrefixXAxisSuffixYAxisPrefixYAxisSuffixEvents
Name | Type | Description |
|---|---|---|
OnElementClick | EventCallback<ChartClickEventArgs> | Raised when the user clicks on a rendered chart element. |
OnElementClickChart Types & Enums
Enumerations for chart type selection and date bucketing.
ChartType
The set of chart types supported by the underlying Chart.js library: Bar, Line, Pie, Doughnut, PolarArea, Radar, Bubble, and Scatter.
ChartType Enum
Values
Name | Value | Description |
|---|---|---|
Bar | 0 | Vertical bar chart (Chart.js |
Line | 1 | Line chart (Chart.js |
Pie | 2 | Pie chart (Chart.js |
Doughnut | 3 | Doughnut chart (Chart.js |
PolarArea | 4 | Polar area chart (Chart.js |
Radar | 5 | Radar chart (Chart.js |
Bubble | 6 | Bubble chart (Chart.js |
Scatter | 7 | Scatter chart (Chart.js |
Funnel | 8 | Funnel chart (via |
Bar0Line1Pie2Doughnut3PolarArea4Radar5Bubble6Scatter7Funnel8ChartDateGrouping
Date bucketing intervals for grouping datetime columns in aggregate queries. Includes simple values (Day, Month, Year) and combined values (MonthAndYear, QuarterAndYear, etc.) that produce formatted labels like "Jan 2024".
ChartDateGrouping Enum
Values
Name | Value | Description |
|---|---|---|
None | 0 | No date grouping — the column is grouped by its raw value. |
Day | 1 | Group by day ( |
Week | 2 | Group by ISO week ( |
Month | 3 | Group by calendar month ( |
Quarter | 4 | Group by calendar quarter ( |
Year | 5 | Group by calendar year ( |
MonthAndYear | 6 | Group by month + year. Label: |
DayAndMonth | 7 | Group by day + month. Label: |
DayAndMonthAndYear | 8 | Group by day + month + year. Label: |
WeekAndYear | 9 | Group by ISO week + year. Label: |
QuarterAndYear | 10 | Group by quarter + year. Label: |
None0Day1Week2Month3Quarter4Year5MonthAndYear6DayAndMonth7DayAndMonthAndYear8WeekAndYear9QuarterAndYear10Data Model
The classes and interfaces that represent chart data, data points, theming, and click event payloads.
ChartData
Bundles the fully-shaped data needed to render a chart: a list of category labels (X axis) and one or more datasets. Returned by data source LoadAsync methods.
ChartData Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
Datasets | List<ChartDataset> | The datasets to plot. Each dataset's ChartDataset.Data length should match ChartData.Labels; missing buckets should be filled with zero-valued data points so position alignment is preserved across series. | |
Labels | List<string> | The category labels rendered along the chart's primary axis. |
DatasetsChartDataset.Data length should match ChartData.Labels; missing buckets should be filled with zero-valued data points so position alignment is preserved across series.LabelsChartDataset
Represents a single dataset (series) in a chart. Contains data points, a legend label, and optional color overrides for background and border.
ChartDataset Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
BackgroundColor | string? | The default background color applied to all elements in this dataset (bars, line fill, etc.) for cartesian chart types. For radial chart types, per-point colors on IDataPoint.BackgroundColor take precedence. When | |
BorderColor | string? | The default border color applied to all elements in this dataset. Same semantics as ChartDataset.BackgroundColor. | |
BorderWidth | double | 1 | The width of the element borders in pixels. Fractional values are supported (for example |
Data | List<IDataPoint> | The data points in this dataset. Each Components.IDataPoint carries a numeric IDataPoint.Value for Chart.js and optional per-point IDataPoint.BackgroundColor / IDataPoint.BorderColor used by radial chart types (pie, doughnut, polarArea) to color individual segments. | |
Label | string | The legend label for this dataset (for example |
BackgroundColorIDataPoint.BackgroundColor take precedence. When BorderColorChartDataset.BackgroundColor.BorderWidthDataComponents.IDataPoint carries a numeric IDataPoint.Value for Chart.js and optional per-point IDataPoint.BackgroundColor / IDataPoint.BorderColor used by radial chart types (pie, doughnut, polarArea) to color individual segments.LabelIDataPoint
IDataPoint is an interface representing a single data point in a chart dataset. Implementations may carry additional context (record id, category, etc.) that is preserved on the C# side and made available to click handlers via ChartClickEventArgs.DataPoint.
IDataPoint Interface
Properties
Name | Type | Default | Description |
|---|---|---|---|
BackgroundColor | string? | Optional background color for this specific data point. Used by radial chart types (pie, doughnut, polarArea) to give each segment a distinct color. When | |
BorderColor | string? | Optional border color for this specific data point. Same semantics as IDataPoint.BackgroundColor. | |
Value | double | The numeric value plotted by Chart.js for this data point. |
BackgroundColorBorderColorIDataPoint.BackgroundColor.ValueDataPoint
Default implementation of IDataPoint. Subclass to attach caller-defined context (record id, region, etc.) that will be available to click handlers.
DataPoint Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
BackgroundColor | string? | Optional background color for this specific data point. Used by radial chart types (pie, doughnut, polarArea) to give each segment a distinct color. When | |
BorderColor | string? | Optional border color for this specific data point. Same semantics as IDataPoint.BackgroundColor. | |
Value | double | 0 | The numeric value plotted by Chart.js for this data point. |
BackgroundColorBorderColorIDataPoint.BackgroundColor.ValueDataverseDataPoint
An IDataPoint implementation that retains the underlying Dataverse TableRecord it was projected from. Click handlers can pattern-match on this type to access the row's id, table name, and column values.
DataverseDataPoint Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
BackgroundColor | string? | Optional background color for this specific data point. Used by radial chart types (pie, doughnut, polarArea) to give each segment a distinct color. When | |
BorderColor | string? | Optional border color for this specific data point. Same semantics as IDataPoint.BackgroundColor. | |
Record | TableRecord? | The Dataverse row this data point was projected from. For non-aggregated queries this is a full record with TableRecord.Id populated; for aggregated queries the row has the aggregate result columns and an empty id. | |
Value | double | 0 | The numeric value plotted by Chart.js for this data point. |
BackgroundColorBorderColorIDataPoint.BackgroundColor.RecordTableRecord.Id populated; for aggregated queries the row has the aggregate result columns and an empty id.ValueChartTheme
Theme and formatting overrides applied to a chart instance — text color, gridline color, Y-axis value formatting (prefix/suffix), chart title, stacked mode, and legend position.
ChartTheme Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
EnableAnimation | bool | True | Gets or sets whether chart animations are enabled. Defaults to |
GridColor | string? | Gets or sets the color used for axis gridlines and borders. | |
IndexAxis | ChartIndexAxis? | The Chart.js category-axis direction. Set by the component layer from the caller's Components.ChartOrientation via Components.ChartOrientation); consumers should set Components.ChartIndexAxis). | |
LegendPosition | ChartLegendPosition? | Legend placement relative to the chart area, or ChartLegendPosition.Hidden to hide it entirely. When Components.ChartLegendPosition). | |
Stacked | bool | False | Gets or sets whether the X and Y axes are stacked. When true, datasets are stacked on top of each other rather than displayed side-by-side. Applies to bar and line charts. |
TextColor | string? | Gets or sets the color used for default text, legend labels, axis ticks, and titles. | |
Title | string? | Gets or sets the chart title text displayed above the chart. When null, no title is shown. | |
XAxisPrefix | string? | Gets or sets a string prepended to each X-axis tick label (for example | |
XAxisSuffix | string? | Gets or sets a string appended to each X-axis tick label. When null, no suffix is applied. | |
YAxisPrefix | string? | Gets or sets a string prepended to each Y-axis tick label and tooltip value (for example | |
YAxisSuffix | string? | Gets or sets a string appended to each Y-axis tick label and tooltip value (for example |
EnableAnimationGridColorIndexAxisComponents.ChartOrientation via Components.ChartOrientation); consumers should set Components.ChartIndexAxis).LegendPositionChartLegendPosition.Hidden to hide it entirely. When Components.ChartLegendPosition).StackedTextColorTitleXAxisPrefixXAxisSuffixYAxisPrefixYAxisSuffixChartClickEventArgs
Payload describing a click on a single chart element (bar, slice, point, etc.). Contains the dataset index, data index, label, value, dataset label, and the original IDataPoint instance for pattern matching.
ChartClickEventArgs Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
DataIndex | int | 0 | The zero-based index of the data point within its dataset. |
DataPoint | IDataPoint? | The actual Components.IDataPoint instance that backs the clicked element. Pattern-match against your custom subclass to access caller-defined context (record id, category, etc.). May be | |
DatasetIndex | int | 0 | The zero-based index of the dataset that contains the clicked element. |
DatasetLabel | string | The label of the dataset the clicked element belongs to (for example | |
Label | string | The category label associated with the clicked element (for example | |
Value | double | 0 | The numeric value of the clicked data point. |
DataIndexDataPointComponents.IDataPoint instance that backs the clicked element. Pattern-match against your custom subclass to access caller-defined context (record id, category, etc.). May be DatasetIndexDatasetLabelLabelValueData Sources
Data source classes that load chart data from Dataverse via FetchXML queries.
DataverseChartDataSource
Base data source class that accepts raw FetchXML and column mappings. Executes the query via IPowerPortalsProService, handles RelatedRecordValue unwrapping for aggregate results, and shapes rows into single- or multi-series ChartData.
DataverseChartDataSource Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
ExternalFilterXml | string? | Optional | |
FetchXml | string? | The FetchXML query to execute. The base class uses this value as-is; subclasses may override Services.IPowerPortalsProService) to compute it from a higher-level config. | |
LabelColumn | string | The result column name to use for chart labels (X axis). For raw FetchXML this is the attribute logical name (or its alias if one was specified in the FetchXML). | |
SeriesColumn | string? | Optional result column name used to split rows into multiple datasets. When set, rows sharing the same series value are grouped into one Components.ChartDataset; the dataset's ChartDataset.Label comes from the formatted series value. When null or empty, all rows form a single dataset. | |
SingleSeriesLabel | string | Optional dataset label applied to the single emitted dataset when DataverseChartDataSource.SeriesColumn is not set. Has no effect for multi-series queries (each series uses its own label). | |
ValueColumn | string | The result column name to read numeric values from. Must reference a numeric column (int, decimal, double, money, big int) on the returned rows. |
ExternalFilterXmlFetchXmlServices.IPowerPortalsProService) to compute it from a higher-level config.LabelColumnSeriesColumnComponents.ChartDataset; the dataset's ChartDataset.Label comes from the formatted series value. When null or empty, all rows form a single dataset.SingleSeriesLabelDataverseChartDataSource.SeriesColumn is not set. Has no effect for multi-series queries (each series uses its own label).ValueColumnMethods
Name | Parameters | Type | Description |
|---|---|---|---|
LoadAsync | IPowerPortalsProService service | Task<ChartData> | Executes the query and shapes the results into Components.ChartData. |
LoadAsyncComponents.ChartData.AggregateDataverseChartDataSource
A subclass that builds an aggregate FetchXML query from simple properties (TableName, GroupByColumn, AggregateColumn, Aggregate) instead of requiring raw FetchXML. Supports date bucketing, multi-series, view-based filtering, inline filter fragments, and linked entity joins.
AggregateDataverseChartDataSource Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
Aggregate | AggregateType | Sum | The aggregate function to apply to AggregateDataverseChartDataSource.AggregateColumn. |
AggregateColumn | string | The Dataverse column to aggregate (e.g. AggregateType.Count this can be any column — it counts rows regardless of nulls. Sets DataverseChartDataSource.ValueColumn on the base class so they stay in sync. | |
ExternalFilterXml | string? | Optional | |
FetchXml | string? | The FetchXML query to execute. The base class uses this value as-is; subclasses may override Services.IPowerPortalsProService) to compute it from a higher-level config. | |
FilterXml | string? | Optional raw FetchXML filter fragment to inject into the generated query. Should be a complete | |
GroupByColumn | string | The Dataverse column to group by — this becomes the chart's X-axis labels (e.g. DataverseChartDataSource.LabelColumn on the base class so they stay in sync. | |
GroupByDateGrouping | ChartDateGrouping | None | When AggregateDataverseChartDataSource.GroupByColumn is a datetime column, set this to control how dates are bucketed. Simple values (Day, Month, Year, etc.) map to a single FetchXML ChartDateGrouping.None for non-date columns. |
GroupByLinkedEntity | ChartLinkedEntity? | Optional linked entity chain for AggregateDataverseChartDataSource.GroupByColumn. When set, the groupby attribute is placed inside the link-entity in the generated FetchXML instead of on the main entity. Supports unlimited nesting via ChartLinkedEntity.LinkedEntity. | |
LabelColumn | string | The result column name to use for chart labels (X axis). For raw FetchXML this is the attribute logical name (or its alias if one was specified in the FetchXML). | |
SeriesColumn | string? | Optional result column name used to split rows into multiple datasets. When set, rows sharing the same series value are grouped into one Components.ChartDataset; the dataset's ChartDataset.Label comes from the formatted series value. When null or empty, all rows form a single dataset. | |
SeriesDateGrouping | ChartDateGrouping | None | Optional date grouping for the series, applied to the same column as AggregateDataverseChartDataSource.GroupByColumn. Use this for year-over-year charts: set AggregateDataverseChartDataSource.GroupByDateGrouping to ChartDateGrouping.Month and ChartDateGrouping.Year to get one series per year with months on the X-axis. When set, DataverseChartDataSource.SeriesColumn is ignored. |
SeriesLinkedEntity | ChartLinkedEntity? | Optional linked entity chain for DataverseChartDataSource.SeriesColumn. When set, the series groupby attribute is placed inside the link-entity. Can reference the same table as AggregateDataverseChartDataSource.GroupByLinkedEntity — the builder reuses the link-entity when the join configuration matches. | |
SingleSeriesLabel | string | Optional dataset label applied to the single emitted dataset when DataverseChartDataSource.SeriesColumn is not set. Has no effect for multi-series queries (each series uses its own label). | |
TableName | string | The Dataverse table to query (e.g. | |
Top | int? | Optional maximum number of grouped rows to return. | |
ValueColumn | string | The result column name to read numeric values from. Must reference a numeric column (int, decimal, double, money, big int) on the returned rows. | |
ViewId | Guid? | Optional saved-view id. When set, the view's filter conditions are extracted from its FetchXML and merged into the generated aggregate query. The view determines which records are included; the aggregate config determines how they're grouped. |
AggregateAggregateDataverseChartDataSource.AggregateColumn.AggregateColumnAggregateType.Count this can be any column — it counts rows regardless of nulls. Sets DataverseChartDataSource.ValueColumn on the base class so they stay in sync.ExternalFilterXmlFetchXmlServices.IPowerPortalsProService) to compute it from a higher-level config.FilterXmlGroupByColumnDataverseChartDataSource.LabelColumn on the base class so they stay in sync.GroupByDateGroupingAggregateDataverseChartDataSource.GroupByColumn is a datetime column, set this to control how dates are bucketed. Simple values (Day, Month, Year, etc.) map to a single FetchXML ChartDateGrouping.None for non-date columns.GroupByLinkedEntityAggregateDataverseChartDataSource.GroupByColumn. When set, the groupby attribute is placed inside the link-entity in the generated FetchXML instead of on the main entity. Supports unlimited nesting via ChartLinkedEntity.LinkedEntity.LabelColumnSeriesColumnComponents.ChartDataset; the dataset's ChartDataset.Label comes from the formatted series value. When null or empty, all rows form a single dataset.SeriesDateGroupingAggregateDataverseChartDataSource.GroupByColumn. Use this for year-over-year charts: set AggregateDataverseChartDataSource.GroupByDateGrouping to ChartDateGrouping.Month and ChartDateGrouping.Year to get one series per year with months on the X-axis. When set, DataverseChartDataSource.SeriesColumn is ignored.SeriesLinkedEntityDataverseChartDataSource.SeriesColumn. When set, the series groupby attribute is placed inside the link-entity. Can reference the same table as AggregateDataverseChartDataSource.GroupByLinkedEntity — the builder reuses the link-entity when the join configuration matches.SingleSeriesLabelDataverseChartDataSource.SeriesColumn is not set. Has no effect for multi-series queries (each series uses its own label).TableNameTopValueColumnViewIdMethods
Name | Parameters | Type | Description |
|---|---|---|---|
LoadAsync | IPowerPortalsProService service | Task<ChartData> | Executes the query and shapes the results into Components.ChartData. |
LoadAsyncComponents.ChartData.ViewDataverseChartDataSource
A subclass that resolves its FetchXML from a Dataverse saved view (saved query). The caller still sets LabelColumn and ValueColumn to indicate which columns map to labels and values.
ViewDataverseChartDataSource Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
ExternalFilterXml | string? | Optional | |
FetchXml | string? | The FetchXML query to execute. The base class uses this value as-is; subclasses may override Services.IPowerPortalsProService) to compute it from a higher-level config. | |
LabelColumn | string | The result column name to use for chart labels (X axis). For raw FetchXML this is the attribute logical name (or its alias if one was specified in the FetchXML). | |
SeriesColumn | string? | Optional result column name used to split rows into multiple datasets. When set, rows sharing the same series value are grouped into one Components.ChartDataset; the dataset's ChartDataset.Label comes from the formatted series value. When null or empty, all rows form a single dataset. | |
SingleSeriesLabel | string | Optional dataset label applied to the single emitted dataset when DataverseChartDataSource.SeriesColumn is not set. Has no effect for multi-series queries (each series uses its own label). | |
ValueColumn | string | The result column name to read numeric values from. Must reference a numeric column (int, decimal, double, money, big int) on the returned rows. | |
ViewId | Guid | 00000000-0000-0000-0000-000000000000 | The unique identifier of the Dataverse saved view to load. The view's Services.IPowerPortalsProService) call. |
ExternalFilterXmlFetchXmlServices.IPowerPortalsProService) to compute it from a higher-level config.LabelColumnSeriesColumnComponents.ChartDataset; the dataset's ChartDataset.Label comes from the formatted series value. When null or empty, all rows form a single dataset.SingleSeriesLabelDataverseChartDataSource.SeriesColumn is not set. Has no effect for multi-series queries (each series uses its own label).ValueColumnViewIdServices.IPowerPortalsProService) call.Methods
Name | Parameters | Type | Description |
|---|---|---|---|
LoadAsync | IPowerPortalsProService service | Task<ChartData> | Executes the query and shapes the results into Components.ChartData. |
LoadAsyncComponents.ChartData.ChartLinkedEntity
Describes a linked entity (join) used by AggregateDataverseChartDataSource to place a groupby or series attribute on a related table. Supports unlimited nesting via the LinkedEntity property for multi-hop joins (e.g. opportunity → account → business unit).
ChartLinkedEntity Class
Properties
Name | Type | Default | Description |
|---|---|---|---|
From | string | The column on the linked table that provides the join key (e.g. | |
JoinType | JoinOperator | Inner | The join type. Defaults to JoinOperator.Inner. |
LinkedEntity | ChartLinkedEntity? | Optional child linked entity for multi-hop joins. The groupby/series attribute is placed on the innermost entity in the chain. | |
TableName | string | The logical name of the table to join (e.g. | |
To | string | The column on the parent table (or parent link-entity) to join to (e.g. |
FromJoinTypeJoinOperator.Inner.LinkedEntityTableNameToLinking charts to a grid
A DataverseChart can mirror the current filter state of a MainGrid. When the user switches the grid's view or types in its search box, the chart re-aggregates against the matching records — and when the grid's Refresh button is pressed, the chart reloads alongside it. Any number of charts can link to the same grid.
Pass the grid reference through a lambda rather than directly. The lambda is resolved after the parent's render completes, so the grid's @@ref has already been captured — a direct LinkedGrid="_grid" would be evaluated as null during that same render pass.
<MainGrid @ref="_grid" TableName="opportunity" ViewIds="_viewIds" />
<DataverseChart Source="_pipelineSource" LinkedGrid="() => _grid" />
<DataverseChart Source="_ratingSource" LinkedGrid="() => _grid" />
@code {
private MainGrid _grid = default!;
// ... data sources ...
}
Under the hood, GridBase exposes two events that charts subscribe to: FetchXmlChanged carries the exact FetchXml the grid just executed (late subscribers receive the most recent value immediately, so the chart still picks up the grid's starting filters if it links up after the initial load), and OnRefresh fires when the user presses Refresh so linked charts always reload even if the filter portion hasn't changed. The chart dedupes FetchXmlChanged on the filter portion so a grid sort doesn't trigger a redundant chart query.
