[Solved] ChartSeriesLabels Template parameter obsolete despite still being supported?

1 Answer 31 Views
Charts
Michael
Top achievements
Rank 1
Michael asked on 02 Jul 2026, 04:06 PM

14.0.0 changed the Template parameter of ChartSeriesLabels so it only supports JavaScript function names and not arbitrary JavaScript: Blazor Breaking Changes 14.0.0 - Telerik UI for Blazor

However, now that Template property is marked as deprecated in code, which causes warnings when developing and during the build. Obviously we want to reduce warnings wherever possible, but even if using Template properly, you will always get the obsolete warning when that property exists in your .razor file.

Is there any reason this change was communicated with the .NET obsolete attribute, which is now resulting in false positive warnings all over the place? Is there any recommendation on what to do with these warnings? I did not find any recommendations on this in the Telerik documentation for the chart, the 14.0.0 release notes, or the 14.0.0 breaking changes article. I don't want to suppress CS0618 project-wide, since it's very useful to have. Should I just write manual warnings suppressions around each use of ChartSeriesLabels across my project? Is Telerik planning to no longer obsolete the Template property in future versions, or is it actually being deprecated in favor of something else?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 03 Jul 2026, 06:31 AM

Hello Michael,

TLDR: There is no better way to communicate a change in the usage of an existing parameter, so we opted for [Obsolete] as a temporary solution. We usually have a major release in November, so this is a possible time to completely drop the legacy syntax support and the obsolete attribute.

=== The long version for the whole community ===

Until version 14.0.0, the Telerik Blazor Chart supported two syntax modes of the various Template parameters:

  • A JavaScript function name, which was the recommended approach.
  • An inline script expression, which was the legacy and not recommended approach that was not CSP compliant.

In version 14.0.0 we deprecated the legacy syntax and wanted to communicate this in some way. C# does not provide a more suitable attribute for that, so we used [Obsolete]. We will remove the attribute in a future version when it's no longer relevant, for example, in November 2026. In the meantime, one can ignore the warning with NoWarn:

  <PropertyGroup>
      <NoWarn>CS0618;</NoWarn>
  </PropertyGroup>

For apps that treat warnings as errors, one can use WarningsNotAsErrors:

  <PropertyGroup>
    <TreatWarningsAsErrors>True</TreatWarningsAsErrors>
    <WarningsNotAsErrors>CS0618;</WarningsNotAsErrors>
  </PropertyGroup>

I agree that the above approach is not ideal if you wish to benefit from CS0618 warnings in general. Some developers have expressed an opinion that we should have deprecated the existing parameter and used a new parameter with a new name for the new single syntax. However, this would surely break everyone and we preferred to avoid that.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Charts
Asked by
Michael
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or