Chart Displays "No Data Series"

2 posts, 0 answers
  1. Rob
    Rob avatar
    1 posts
    Member since:
    Mar 2011

    Posted 02 May 2011 Link to this post

    Hi,

    I have created a chart to display time series data in my project.  I have it arranged as a RadChart and RadTimeBar control.  The TimeBar contains a sparkline to show the overall data trend, while the chart is supposed to display the details.

    My problem is with the chart.  The timebar displays the data just fine, but the chart seems stuck on a single value, which seems to be related to the window selected in the time bar.  I have no idea why this is not working properly.  Please help!

    Please see screen shot and code:

    Thanks

    <telerik:RadChart Name="radChart1" Grid.Row="0">
        <telerik:RadChart.TimeBar>
            <Binding ElementName="radTimeBar1" />
        </telerik:RadChart.TimeBar>
    </telerik:RadChart>


    private void AddPointToChart(PointSeriesContainer pointSeries)
    {
        if (radChart1.SeriesMappings.Count == 0)
            AddSparklineToTimeBar(pointSeries);
        var seriesMap = CreateSeriesMapping(pointSeries);
        radChart1.SeriesMappings.Add(seriesMap);
    }       
     
    private static SeriesMapping CreateSeriesMapping(PointSeriesContainer pointSeries)
    {
        SeriesMapping seriesMapping = new SeriesMapping();
     
        seriesMapping.ItemsSource = pointSeries.TransformedSamples;
        seriesMapping.LegendLabel = pointSeries.Point.Name;
        seriesMapping.SeriesDefinition = new LineSeriesDefinition { ShowItemToolTips = true };
     
        ItemMapping xMapping = new ItemMapping("SampleTime", DataPointMember.XValue);
        ItemMapping yMapping = new ItemMapping("PointValue", DataPointMember.YValue) { AggregateFunction = ChartAggregateFunction.Sum };
        ItemMapping toolMapping = new ItemMapping("PointValue", DataPointMember.Tooltip);
     
        seriesMapping.ItemMappings.Add(xMapping);
        seriesMapping.ItemMappings.Add(yMapping);
        seriesMapping.ItemMappings.Add(toolMapping);
     
        return seriesMapping;
    }



  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 05 May 2011 Link to this post

    Hello Rob,

    It is hard for us to determine the cause of the issue from the code snippets provided. Have you seen our demo as it does exactly what you want to achieve? If the issue still occurs it will be very helpful if you can send us a sample runnable project so that we can investigate it and help you.

    Best wishes,
    Evgenia
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top