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
50
error for Datapoint Tooltips
posted

Hi ,
      I am getting An item with the same key has already been added. error . Here is my code.

    <DockPanel x:Name="LayoutRoot">
        <Grid>
            <igCA:XamChart HorizontalAlignment="Left"  Name="XamChart1" VerticalAlignment="Top"  >
                <igCA:XamChart.Axes>
                    <igCA:Axis AxisType="PrimaryX">
                        <igCA:Axis.Label>
                            <igCA:Label Format="{}{0:MMM-yyyy}" FontWeight="Bold"/>
                        </igCA:Axis.Label>
                    </igCA:Axis>
                    <igCA:Axis AxisType="PrimaryY">
                        <igCA:Axis.Label>
                            <igCA:Label Format="{} {0:C}" FontWeight="Bold"/>
                        </igCA:Axis.Label>
                    </igCA:Axis>
                </igCA:XamChart.Axes>
            </igCA:XamChart>
        </Grid>
    </DockPanel>
  Using context = New MVEntities()
            Dim query = context.GetChartData(13).ToList
            Dim seriesUnitsInStock As New Series()
            seriesUnitsInStock.DataSource = query
            seriesUnitsInStock.DataMapping = "Value = Amt; Label = MonYr; ToolTip=Amt"
            Me.XamChart1.Series.Add(seriesUnitsInStock)
        End Using
query has two columns MonYr (1st day of the Month) & Amount.
Any idea how to resolve the error?
Thank you