New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Series Labels Color is not Transparent

PROBLEM

Background color of RadHtmlChart series labels is no longer transparent, but takes the color of the series item.

SOLUTION

To get transparent colors back, you can change the chart options via the underlying Kendo Chart Widget API (see also individual series label and default label).

<script>
    function OnLoad(sender) {
        var kChart = sender.get_kendoWidget();
        var kChartOptions = kChart.options;
        kChartOptions.seriesDefaults.labels.background = "transparent";
        kChart.setOptions(kChartOptions);
        kChart.redraw();
    }
</script>
<telerik:RadHtmlChart runat="server" ID="rhc1">
    <ClientEvents OnLoad="OnLoad" />
    <PlotArea>
        <Series>
            <telerik:DonutSeries>
                <Items>
                    <telerik:SeriesItem  YValue="1" Name="first"/>
                    <telerik:SeriesItem  YValue="2" Name="second"/>
                </Items>
            </telerik:DonutSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>
In this article
Not finding the help you need? Improve this article