Brendan Enrick

Daily Software Development

How to Change or Remove the No Data Series Message in a RadChart for Silverlight

I’ve been working with the charts from Telerik’s RadControls for Silverlight. I am of course not blocking the UI when I make my requests to get my data for the charts. Since I am doing this late-loading of the data into the charts it causes them to initially show a message, “No Data Series.” This message is not a bad default message since it provides adequate information about why the chart is not displaying data.


However, since my charts will always start with no data, that message is quite silly. Luckily, changing or removing that message is easy. There is a convenient property on the ChartArea object called NoDataString, and in my case I set that as an empty string and I receive this nice blank chart now. I could potentially change the message to something else.


Snippet of Relevant Code

<UserControl x:Class="MyProject.UI.Charts.MyChart"
    Width="400" Height="300">
    <Grid x:Name="LayoutRoot">
        <telerikChart:RadChart x:Name="Chart1" 
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                <telerikCharting:ChartTitle Content="My Chart" 
                <telerikCharting:ChartArea x:Name="ChartArea1" 
                  Grid.Row="1" NoDataString="" />