Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
showing string values
posted

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,

 

 

Parents
No Data
Reply Children
No Data