How to remove the gap in the chart?

2 posts, 0 answers
  1. diandian82
    diandian82 avatar
    13 posts
    Member since:
    Jul 2007

    Posted 02 Jun 2011 Link to this post

    Hello folks,

    Recently i got a problem when display the RadChart by using CandleStickSeriesDefinition.

    The definition of the series is as follows,

    _mainSeriesMapping.SeriesDefinition = new CandleStickSeriesDefinition();
                _mainSeriesMapping.SeriesDefinition.Appearance.StrokeThickness = 1;
                _mainSeriesMapping.SeriesDefinition.Appearance.Stroke = new SolidColorBrush(Colors.Green);
                _mainSeriesMapping.SeriesDefinition.Appearance.Fill = new SolidColorBrush(Colors.Green);
                _mainSeriesMapping.SeriesDefinition.ShowItemToolTips = true;
                var imHigh = new ItemMapping("HighPrice", DataPointMember.High);
                var imLow = new ItemMapping("LowPrice", DataPointMember.Low);
                var imOpen = new ItemMapping("OpenPrice", DataPointMember.Open);
                var imClose = new ItemMapping("ClosePrice", DataPointMember.Close);
                var imXDate = new ItemMapping("ProcessDateTime", DataPointMember.XValue);
                var imYDate = new ItemMapping("ClosePrice", DataPointMember.YValue);

    Then I bind to the my entity and got the picture as the attached file.

    In the middle, there is a big gap, this is because in those two days(AxisX) are weekend and has no data. I just want to know how can i remove those weekend days in the chart and got the continuous data.

    Thanks very much for your help.
  2. Yavor
    Yavor avatar
    11 posts

    Posted 07 Jun 2011 Link to this post


    Presently, the way to solve this issue would be to remove the entries from the underlying datasource. For example, if the control is bound to a field for its .XCategoty/.XValue. Then, if in out of 100 values, the ones in positions from 20 to 45 have no data, you can simply remove them, and pass a datasource to the chart, which contains no empty points. In this way, the data will be visually continuous.
    I hope this gets you started properly.

    Best wishes,
    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