VS 2022 17.10.6
I add a brand new Blazor Web App project, using .NET 8, Server Render, then I install the Radzen components (5.1.1). I followed the Get Started section to configure everything. On the pre-canned Home.razor page I have the code like this:
@page "/"
<PageTitle>Home</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.
<p role="status">Current count: @currentCount</p>
<RadzenButton Click="@IncrementCount" Text="Hi"></RadzenButton>
<RadzenChart>
<RadzenColumnSeries Data="@revenue" CategoryProperty="Quarter" ValueProperty="Revenue" />
</RadzenChart>
@code {
class DataItem
{
public string Quarter { get; set; }
public double Revenue { get; set; }
}
DataItem[] revenue = new DataItem[]
{
new DataItem { Quarter = "Q1", Revenue = 234000 },
new DataItem { Quarter = "Q2", Revenue = 284000 },
new DataItem { Quarter = "Q3", Revenue = 274000 },
new DataItem { Quarter = "Q4", Revenue = 294000 }
};
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}
The result is that the Radzen button shows, but the Click event doesn't work, and the Radzen chart doesn't show at all. In a project that had an older version of Radzen components, then upgraded to 5.1.1 the chart works, but if I start out a new project using 5.1.1 I can't get the chart to show.
Help! I am probably doing something stupid, but for the life of me I can't figure this out. I've tried this three times now with the same results.