hi guys
i am using web chart with scatterline , but when i show the string data on the
x axis i dont see the data on x axis correctly
my code is below
List<GridViewModel> lstdata = new List<GridViewModel>(); lstdata.Add(new GridViewModel() { Label = "A1", Value = 90 }); lstdata.Add(new GridViewModel() { Label = "A2", Value = 190 }); lstdata.Add(new GridViewModel() { Label = "A3", Value = 1000 }); Infragistics.Silverlight.Chart.Series s1 = new Infragistics.Silverlight.Chart.Series() { ChartType = ChartType.Bar, DataMapping = "ValueX=Label;ValueY=Value", DataSource = lstdata }; dataChart.Series.Add(s1);
and in my xaml
<igChart:XamWebChart x:Name="dataChart" Margin="20,20,0,0" Background="AliceBlue"> <igChart:XamWebChart.Crosshairs> <igChart:Crosshairs Enabled="True"> <igChart:Crosshairs.VerticalCrosshair> <igChart:CrosshairLine Fill="#FFB4B4B4" Thickness=".5" /> </igChart:Crosshairs.VerticalCrosshair> <igChart:Crosshairs.HorizontalCrosshair> <igChart:CrosshairLine Fill="#FFB4B4B4" Thickness=".5" /> </igChart:Crosshairs.HorizontalCrosshair> </igChart:Crosshairs> </igChart:XamWebChart.Crosshairs> <igChart:XamWebChart.Axes> <igChart:Axis AxisType="PrimaryY" Logarithmic="False"> <igChart:Axis.MinorGridline > <igChart:GridlineGroup Visibility="Collapsed"/> </igChart:Axis.MinorGridline> </igChart:Axis> <igChart:Axis AxisType="PrimaryX"> <igChart:Axis.MinorGridline > <igChart:GridlineGroup Visibility="Collapsed"/> </igChart:Axis.MinorGridline> </igChart:Axis> </igChart:XamWebChart.Axes> </igChart:XamWebChart>
regards,
The scatter line chart does not support string data on the x or y axis, only numeric data (http://help.infragistics.com/NetAdvantage/DV/2009.2/CLR3.5/?page=SL_DV_xamWebChart_Scatter_Line_Chart.html). Do you, perhaps, mean to be using a line chart?