Horizontal Range Bar Chart bound to DateTime

4 posts, 0 answers
  1. Josh Eastburn
    Josh Eastburn avatar
    32 posts
    Member since:
    Aug 2012

    Posted 14 Apr 2011 Link to this post

    I'm working with the new Horizontal Range Bar Chart (http://demos.telerik.com/silverlight/#Chart/Gallery/RangeBar) and I'd like to bind the Low/High to DateTime properties.  Is this possible?  As I have it now, I get an invalid cast exception.

    <telerikChart:RadChart x:Name="dateChart" Grid.Column="1" ItemsSource="{Binding DateCollection}" BorderThickness="0" Background="Transparent">
        <telerikChart:RadChart.SeriesMappings>
            <telerikCharting:SeriesMapping LegendLabel="DateRanges">
                <telerikCharting:SeriesMapping.SeriesDefinition>
                    <telerikCharting:HorizontalRangeBarSeriesDefinition/>
                </telerikCharting:SeriesMapping.SeriesDefinition>
                <telerikCharting:ItemMapping DataPointMember="Low" FieldName="StartDate" />
                <telerikCharting:ItemMapping DataPointMember="High" FieldName="EndDate" />
            </telerikCharting:SeriesMapping>
        </telerikChart:RadChart.SeriesMappings>
        <telerikChart:RadChart.DefaultView>
            <telerikCharting:ChartDefaultView>
                <telerikCharting:ChartDefaultView.ChartLegend>
                    <telerikCharting:ChartLegend Visibility="Collapsed"/>
                </telerikCharting:ChartDefaultView.ChartLegend>
                <telerikCharting:ChartDefaultView.ChartArea>
                    <telerikCharting:ChartArea NoDataString="No Data Available"/>
                </telerikCharting:ChartDefaultView.ChartArea>
            </telerikCharting:ChartDefaultView>
        </telerikChart:RadChart.DefaultView>
    </telerikChart:RadChart>

    Also, I'd like to have each bar a separate color.  All of the bars are the same color since they are part of the same series.  Is there a way around this or a recommendation for using a separate series for each data item?
    Thanks.
    Josh
  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 20 Apr 2011 Link to this post

    Hi Josh,

    Currently RangeBar Chart type does not support DateTime as High/Low values type. Do you need to have a Gantt Chart in SL? If this is the case - this will be done soon with our ScheduleView control so stay tuned.

    All the best,
    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
  3. Josh Eastburn
    Josh Eastburn avatar
    32 posts
    Member since:
    Aug 2012

    Posted 20 Apr 2011 Link to this post

    Thanks, Evgenia.
    Yes, I am basically looking for a very simple Gantt chart to show start/end durations for each item in the series.
    Will there be a simpler version of the ScheduleView control to do this or do I need to load the entire scheduler control to display a gantt chart?

    Josh
  4. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 26 Apr 2011 Link to this post

    Hello Josh,

    There will be a simple version called GanttView but unfortunately I can not give you a definite timeframe for releasing it. Let us know if there is something else we can help you with.

    Kind regards,
    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