Dynamic Chart

Hi,

to create a RadzenChart, instead of using parameters like this

<RadzenLineSeries Smooth="@smooth" Data="@revenue2024" CategoryProperty="Date" Title="2024" ValueProperty="Revenue">
    <RadzenMarkers Visible="@showMarkers" MarkerType="MarkerType.Circle" />

do you know if it s possible to put value directly in the chart something like this :

<RadzenChart Style="width: 700px; height: 400px;">
    <RadzenLineSeries Title="Time Series">
        <RadzenChartSeriesData>
            <RadzenChartSeriesDataPoint Category="AAA" Value="20" />
            <RadzenChartSeriesDataPoint Category="BBB" Value="30" />
            <RadzenChartSeriesDataPoint Category="CCC" Value="70" />
        </RadzenChartSeriesData>
    </RadzenLineSeries>
    <RadzenCategoryAxis Title="Category" />
    <RadzenValueAxis Title="Value" />
</RadzenChart>

the idea is to create dynamique chart in markdown

thank you for your help

That’s not possible - you can build the collection with data bound to the chart dynamically.

hi thank you for your help
but it s not what i want.
do you know if there is are planned dev to allow user to enter the point one by one without building a collection and then bound it?

thank

Hi @Tia,

There isn't such a planned task at the moment. In most cases developers bind the chart to data hence such inline definition hasn't been implemented. Feel free to open a new feature request here. Meanwhile you can just create a simple class to use it with the chart:

public class ChartDataItem
{
    public string Category { get; set; }
    public double Value { get; set; }
}