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
60
Possible Bug in series object
posted

Hi,

I am populating a column chart programatically from the data returned from service. The following xaml will explain how the data is coming back from the service.

<igChart:XamWebChart.Series>
                    <igChart:Series Label="Open" DataPointStyle="{StaticResource ColumnChart}" ChartType="Column">
                        <igChart:Series.Animation>
                            <igChart:Animation />
                        </igChart:Series.Animation>
                        <igChart:Series.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF358ECA" />
                                <GradientStop Color="#FF014E7C" Offset="1" />
                            </LinearGradientBrush>
                        </igChart:Series.Fill>
                        <igChart:Series.DataPoints>
                            <igChart:DataPoint Label="Jan" Value="25" />
                        </igChart:Series.DataPoints>
                    </igChart:Series>
                    <igChart:Series Label="Active" ChartType="Column" DataPointStyle="{StaticResource ColumnChart}">
                        <igChart:Series.Animation>
                            <igChart:Animation />
                        </igChart:Series.Animation>
                        <igChart:Series.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFA7D912" />
                                <GradientStop Color="#FF496100" Offset="1" />
                            </LinearGradientBrush>
                        </igChart:Series.Fill>
                        <igChart:Series.DataPoints>
                            <igChart:DataPoint Label="Feb" Value="15" />
                        </igChart:Series.DataPoints>
                    </igChart:Series>
                </igChart:XamWebChart.Series>

Now the problem with this is, chart renders only 1 point in x-axis with 2 values, where as it should have rendered 2 points. Please let me know if this is a bug and if you have any work-around for this.

Thanks,
Apratim

Parents
No Data
Reply
  • 30692
    Suggested Answer
    Offline posted

    Apratim,

    For this kind of series, the labels are going to be based of the first series in the chart, and there is the assumption that the seperate series will be aligned in terms of label, so something like this:

    <igChart:XamWebChart>

                <igChart:XamWebChart.Series>

                    <igChart:Series Label="Open"  ChartType="Column">

                        <igChart:Series.Animation>

                            <igChart:Animation />

                        </igChart:Series.Animation>

                        <igChart:Series.Fill>

                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

                                <GradientStop Color="#FF358ECA" />

                                <GradientStop Color="#FF014E7C" Offset="1" />

                            </LinearGradientBrush>

                        </igChart:Series.Fill>

                        <igChart:Series.DataPoints>

                            <igChart:DataPoint Label="Jan" Value="25" />

                            <igChart:DataPoint Label="Feb" Value="0" />

                            <igChart:DataPoint Label="Mar" Value="14" />

                        </igChart:Series.DataPoints>

                    </igChart:Series>

                    <igChart:Series Label="Active" ChartType="Column" >

                        <igChart:Series.Animation>

                            <igChart:Animation />

                        </igChart:Series.Animation>

                        <igChart:Series.Fill>

                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">

                                <GradientStop Color="#FFA7D912" />

                                <GradientStop Color="#FF496100" Offset="1" />

                            </LinearGradientBrush>

                        </igChart:Series.Fill>

                        <igChart:Series.DataPoints>

                            <igChart:DataPoint Label="Jan" Value="0" />

                            <igChart:DataPoint Label="Feb" Value="15" />

                            <igChart:DataPoint Label="Mar" Value="18" />

                        </igChart:Series.DataPoints>

                    </igChart:Series>

                </igChart:XamWebChart.Series>

            </igChart:XamWebChart>

    probably renders more in the way you would expect. You can fill out missing values in either series with 0 values.

    -Graham

Children