This is a migrated thread and some comments may be shown as answers.

Horizontal Range Bar Chart bound to DateTime

3 Answers 165 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Josh Eastburn
Top achievements
Rank 1
Josh Eastburn asked on 14 Apr 2011, 10:17 PM
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

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 20 Apr 2011, 09:19 AM
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
0
Josh Eastburn
Top achievements
Rank 1
answered on 20 Apr 2011, 09:23 PM
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
0
Evgenia
Telerik team
answered on 26 Apr 2011, 11:10 AM
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
Tags
Chart
Asked by
Josh Eastburn
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Josh Eastburn
Top achievements
Rank 1
Share this question
or