Hello, i have a problem with my chart i want to att columnbars and on top of that a lineseries.
sample data for columnbar
X: "2010 12" Y: 10
X: "2011 01" Y: 20
X: "2011 02" Y: 30
X: "2011 03" Y: 40
X: "2011 04" Y: 40
X: "2011 05" Y: 30
lineseries
X: "2010 12" Y: 14
X: "2011 05" Y: 30
XAML
<chartingToolkit:ColumnSeries x:Name="GoodPercent"
Title="Good"
ItemsSource="{Binding}"
IndependentValuePath="Period"
DependentValuePath="Percent" DataPointStyle="{StaticResource ColumnDataPointStyleOfficeGreen}" / >
<chartingToolkit:LineSeries x:Name="Trendline" Title="Trend - satisfied"
ItemsSource="{Binding}"
IndependentValuePath="Period"
DependentValuePath="Number" />
CODE BEHIND
ColumnSeries cs1 = ScoreInPercentChart.Series[0] as ColumnSeries;
cs1.ItemsSource = e.Result.Where(res => res.ord.Value == 1);
LineSeries ls = ScoreInPercentChart.Series[1] as LineSeries;
ObservableCollection<Trend> myTrend = new ObservableCollection<Trend>();
myTrend.Add(new Trend { Period = "2010 12", Number = 85.3 });
myTrend.Add(new Trend { Period = "2011 05", Number = 60.5 });
ls.ItemsSource = myTrend;
my problem is that when i add the lineseries in codebehind my chart is sorting the xaxis wrong
2010 12
2011 05
2011 01
2011 02
2011 03
2011 04
if i place the lineseries at the bottom it displays correctly, but then it´s hidden behind the columnbars.
is there a way to sort the chart correctly, i want the lineseries to be placed on top.
i have googled but i haven't found a specific answer when dealing with both a columnbar and lineseries in the same chart.
can someone please help!