Hi,
i just wanted to test the chart and I placed a chart on XAML window without any changes.
Now do in code behind
chart.DataContext = myObservableCollection;
But nothing happens ...
Is there an easy how to ?
Hi, a good place to start would be our samples and help:
Here is an example of how to set up most of the category series:
http://samples.infragistics.com/sldv/RunSamples.aspx?cn=data-chart#/data-chart/category-series
and if you examine the help topic for any of the series types it will show the requirements for that type of series, and here is a general overview of data mapping: http://help.infragistics.com/NetAdvantage/DV/2011.1/CLR4.0/?page=xamDataChart_Data_Mapping.html
Let me know if you have further questions. Hope this helps!
-Graham
I got thta working, but meanwhile I#m stopping at the X-Axis.
I wanna have Labels on XAxis showing, but in general the x-axis is not showing.
I did nothing in xaml.
I just wanna do that in code behind.
CategoryXAxis xaxis = new CategoryXAxis(); AxisLabelSettings als = new AxisLabelSettings(); als.Visibility = System.Windows.Visibility.Visible; als.Location = AxisLabelsLocation.OutsideBottom; xaxis.LabelSettings = als; xaxis.ItemsSource = _devMin; xaxis.LabelSettings.Location = AxisLabelsLocation.OutsideBottom; igChart.Axes.Add(xaxis); AreaSeries a = new AreaSeries(); a.Name = "Toleranz_Min"; a.ItemsSource = _devMin; a.ValueMemberPath = "Y"; a.XAxis = xaxis; a.YAxis = yaxis; a.Brush = new LinearGradientBrush(Colors.Green, Colors.LightGreen, 90); a.Outline = Brushes.Red; a.BorderBrush = Brushes.Magenta; igChart.Series.Add(a);
_devmin is currently an ObservableCollection<CPoint> CPoint has x and Y properties which are nullable.
I also tried this with a collection havin X and Textlabel as string,but it does not work.
Second question:
How does it work to add legend completely in code behind?
Are there any samples?