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

HorizonalBar with vertical line

1 Answer 100 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Guy
Top achievements
Rank 1
Guy asked on 30 Aug 2010, 03:08 PM
Hey,
   I try to create Horizontal Bar chart with a vertical line in the middle (shows critical level).
   The only solution I found is to create multiple series. However I can't make it work.
   I am getting an exception for multiple series of HorizonalBarSeries and LineSeries.
   What am I doing wrong?
   Here is the xaml + exception:

<

 

telerik:RadChart>

 

 

 

<telerik:RadChart.DefaultView>

 

 

 

<telerik:ChartDefaultView ChartLegendPosition="Bottom">

 

 

 

<telerik:ChartDefaultView.ChartTitle>

 

 

 

<telerik:ChartTitle Visibility="Collapsed" OuterBorderThickness="0">

 

 

 

</telerik:ChartTitle>

 

 

 

</telerik:ChartDefaultView.ChartTitle>

 

 

 

<telerik:ChartDefaultView.ChartArea>

 

 

 

<telerik:ChartArea>

 

 

 

<telerik:ChartArea.DataSeries>

 

 

 

<telerik:DataSeries>

 

 

 

<telerik:DataSeries.Definition>

 

 

 

<telerik:HorizontalBarSeriesDefinition ItemLabelFormat="#Y{#,###}"></telerik:HorizontalBarSeriesDefinition>

 

 

 

</telerik:DataSeries.Definition>

 

 

 

</telerik:DataSeries>

 

 

 

<telerik:DataSeries>

 

 

 

<telerik:DataSeries.Definition>

 

 

 

<telerik:LineSeriesDefinition ShowItemLabels="False"></telerik:LineSeriesDefinition>

 

 

 

</telerik:DataSeries.Definition>

 

 

 

</telerik:DataSeries>

 

 

 

</telerik:ChartArea.DataSeries>

 

 

 

</telerik:ChartArea>

 

 

 

</telerik:ChartDefaultView.ChartArea>

 

 

 

</telerik:ChartDefaultView>

 

 

 

</telerik:RadChart.DefaultView>

 

 

 

</telerik:RadChart>

exception:
Cannot add content of type 'Telerik.Windows.Controls.Charting.DataSeries' to an object of type 'Telerik.Windows.Controls.Charting.DataSeriesCollection'.  Error at object 'Telerik.Windows.Controls.Charting.DataSeries' in markup file 'component/controls/dashboard/ciddashboardcontrol.xaml'.

 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 02 Sep 2010, 12:03 PM
Hello Guy,

One possible option in this case would be to use marked zones. Additional information can be found in this article:

http://www.telerik.com/help/wpf/radchart-features-annotations-marked-zone.html

Other than this, the control does not support having both vertical and horizontal lines in the chart area.
I hope this information helps.

Best wishes,
Yavor
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
Guy
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or