This is a migrated thread and some comments may be shown as answers.

Duplicate values in Axis Y

2 Answers 34 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Gautam
Top achievements
Rank 1
Gautam asked on 09 Mar 2011, 02:34 PM
Hi telerik team,

I tried to display a chart with datapoints having YValues of 1 and 2 and the chart is generated with duplicate Y values as 1,1,1,1, 2,2,2,2. I am using the ItemsSource property to bind the chart data series. (Please find the attached screen shots).

Is there a way to avoid these duplicate values? 

2 Answers, 1 is accepted

Sort by
0
Rahul
Top achievements
Rank 2
answered on 11 Mar 2011, 05:48 AM
I'm also working on Multiple y axis. Can u please share your code with me for multiple Y-axis.
Thanks in advance.
0
Evgenia
Telerik team
answered on 14 Mar 2011, 02:54 PM
Hi,

@Gautam - I couldn't reproduce the issue you are facing. You can see a sample image attached created with the following code and the AxisY doesn't visualize duplicated Y values:
public partial class Example : UserControl
   {
       public Example()
       {
           InitializeComponent();
           List<Manufacturer> data = new List<Manufacturer>();
           data.Add(new Manufacturer("Immediate or Cycle Error Stop Count", 2));
           data.Add(new Manufacturer("Transport Error Count", 1));
           SeriesMapping seriesMapping = new SeriesMapping();
           seriesMapping.ItemMappings.Add(new ItemMapping("Name", DataPointMember.XCategory));
           seriesMapping.ItemMappings.Add(new ItemMapping("Value", DataPointMember.YValue));
           this.RadChart1.SeriesMappings.Add(seriesMapping);
           RadChart1.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Inside;
           this.RadChart1.ItemsSource = data; 
       }
       public class Manufacturer
       {
           public Manufacturer(string name, int value)
           {
               this.Name = name;
               this.Value = value;
           }
           public string Name
           {
               get;
               set;
           }
           public int Value
           {
               get;
               set;
           }
       
   }

The Chart is databound using the Manual Series Mappings.
 
@Rahul - you can find our help topic with source code helpful for creating RadChart with Multiple Y Axes.

All the best,
Evgenia
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Chart
Asked by
Gautam
Top achievements
Rank 1
Answers by
Rahul
Top achievements
Rank 2
Evgenia
Telerik team
Share this question
or