Line Chart

Render a line chart by setting Type="ChartType.Line". Line charts are ideal for showing trends over time — the same AggregateDataverseChartDataSource and DataverseChart convenience component work with any chart type.

Dataverse Example

Average opportunity estimated value by year, split by rating (Hot / Warm / Cold). Click a point to see its details.

Blazor example
React example

Year-over-Year Comparison

Set SeriesDateGrouping to split the same date column into multiple series by a different time interval. For example, GroupByDateGrouping = ChartDateGrouping.Month with SeriesDateGrouping = ChartDateGrouping.Year produces one line per year with months on the X-axis.

<DataverseChart Source="_source"
                Type="ChartType.Line"
                Title="Revenue by Month (Year over Year)"
                YAxisPrefix="$" />

@code {
    private readonly AggregateDataverseChartDataSource _source = new()
    {
        TableName = "opportunity",
        GroupByColumn = "actualclosedate",
        GroupByDateGrouping = ChartDateGrouping.Month,
        SeriesDateGrouping = ChartDateGrouping.Year,
        AggregateColumn = "estimatedvalue",
        Aggregate = AggregateType.Sum,
    };
}

Year-over-Year Example

Total estimated revenue by month, with each year as a separate line. Compare seasonal patterns across years.

Blazor example
React example

See Also

Chart API Reference — complete documentation for all chart classes, enums, and data sources.