Silverlight Teechart - DataUpdates rendered incorrectly
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
Silverlight Teechart - DataUpdates rendered incorrectly
I have Teechart Version 4 Silverlight Teechart Beta.
I have Line series which is binded to ObservableCollection. Data update to a series point adds new point in the series. Instead it should update the existing point.
I know it is in Beta version.
The code for same is given Below. On click of button 'Button_Click', the third item in observable collection is updated. And it adds new point in series which is incorrect.
public partial class Teechart2 : UserControl
{
public Teechart2()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Silverlight.Styles.Line line;
private NameList observable;
private int count;
private void Button_Click(object sender, RoutedEventArgs e)
{
count += 20;
observable[2].Height = 300 + count;
tChart1.Series[0].CheckDataSource();
//observable.RemoveAt(3);
//tChart1.Series[0].CheckDataSource();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(line = new
Steema.TeeChart.Silverlight.Styles.Line());
line.XValues.DataMember = "DateOfBirth";
line.XValues.DateTime = true;
line.YValues.DataMember = "Height";
line.LabelMember = string.Empty;
line.Pointer.Visible = true;
observable = new NameList();
line.DataSource = observable;
}
}
public class NameList : ObservableCollection<Person>
{
public NameList()
: base()
{
Add(new Person("Willa", "Cather", DateTime.Today.AddYears(1), Colors.Red, 171));
Add(new Person("Isak", "Dinesen", DateTime.Today.AddYears(2), Colors.Green, 189));
Add(new Person("Victor", "Hugo", DateTime.Today.AddYears(3), Colors.Blue, 196));
Add(new Person("Jules", "Verne", DateTime.Today, Colors.Orange, 175));
Add(new Person("H", "Priya", DateTime.Today.AddYears(4), Colors.Red, 134));
Add(new Person("G", "Vipul", DateTime.Today.AddYears(5), Colors.Green, 189));
}
}
public class Person
{
private string firstName;
private string lastName;
private DateTime dob;
private Color favorite;
private int height;
public Person(string first, string last, DateTime dob, Color favorite, int height)
{
this.firstName = first;
this.lastName = last;
this.dob = dob;
this.favorite = favorite;
this.height = height;
}
public string FirstName
{
get { return firstName; }
set
{
firstName = value;
}
}
public string LastName
{
get { return lastName; }
set
{
lastName = value;
}
}
public DateTime DateOfBirth
{
get { return dob; }
set
{
dob = value;
}
}
public Color FavoriteColor
{
get { return favorite; }
set
{
favorite = value;
}
}
public int Height
{
get { return height; }
set
{
height = value;
}
}
}
Regards,
Priya
I have Line series which is binded to ObservableCollection. Data update to a series point adds new point in the series. Instead it should update the existing point.
I know it is in Beta version.
The code for same is given Below. On click of button 'Button_Click', the third item in observable collection is updated. And it adds new point in series which is incorrect.
public partial class Teechart2 : UserControl
{
public Teechart2()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Silverlight.Styles.Line line;
private NameList observable;
private int count;
private void Button_Click(object sender, RoutedEventArgs e)
{
count += 20;
observable[2].Height = 300 + count;
tChart1.Series[0].CheckDataSource();
//observable.RemoveAt(3);
//tChart1.Series[0].CheckDataSource();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(line = new
Steema.TeeChart.Silverlight.Styles.Line());
line.XValues.DataMember = "DateOfBirth";
line.XValues.DateTime = true;
line.YValues.DataMember = "Height";
line.LabelMember = string.Empty;
line.Pointer.Visible = true;
observable = new NameList();
line.DataSource = observable;
}
}
public class NameList : ObservableCollection<Person>
{
public NameList()
: base()
{
Add(new Person("Willa", "Cather", DateTime.Today.AddYears(1), Colors.Red, 171));
Add(new Person("Isak", "Dinesen", DateTime.Today.AddYears(2), Colors.Green, 189));
Add(new Person("Victor", "Hugo", DateTime.Today.AddYears(3), Colors.Blue, 196));
Add(new Person("Jules", "Verne", DateTime.Today, Colors.Orange, 175));
Add(new Person("H", "Priya", DateTime.Today.AddYears(4), Colors.Red, 134));
Add(new Person("G", "Vipul", DateTime.Today.AddYears(5), Colors.Green, 189));
}
}
public class Person
{
private string firstName;
private string lastName;
private DateTime dob;
private Color favorite;
private int height;
public Person(string first, string last, DateTime dob, Color favorite, int height)
{
this.firstName = first;
this.lastName = last;
this.dob = dob;
this.favorite = favorite;
this.height = height;
}
public string FirstName
{
get { return firstName; }
set
{
firstName = value;
}
}
public string LastName
{
get { return lastName; }
set
{
lastName = value;
}
}
public DateTime DateOfBirth
{
get { return dob; }
set
{
dob = value;
}
}
public Color FavoriteColor
{
get { return favorite; }
set
{
favorite = value;
}
}
public int Height
{
get { return height; }
set
{
height = value;
}
}
}
Regards,
Priya
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Priya,
Would you be so kind to send us this code project so that we can reproduce the issue here? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Would you be so kind to send us this code project so that we can reproduce the issue here? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Priya,
Thanks for the example project. I could reproduce the issue here and added the defect (TW24013934) to the bug list to be investigated.
Thanks for the example project. I could reproduce the issue here and added the defect (TW24013934) to the bug list to be investigated.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Priya,
The release is imminent. I'll let you know when it's out.
The release is imminent. I'll let you know when it's out.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Priya,
Yes I understand your point but I'm unable to provide an estimate date for this being fixed at the present moment. Please be aware at TeeChart for .NET forum or subscribe to our RSS news feed for new release announcements and what's fixed on them.
Yes I understand your point but I'm unable to provide an estimate date for this being fixed at the present moment. Please be aware at TeeChart for .NET forum or subscribe to our RSS news feed for new release announcements and what's fixed on them.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Re: Silverlight Teechart - DataUpdates rendered incorrectly
Hello,
I can't reproduce this issue in the latest publicly available version of TeeChart.Silverlight.dll within TeeChart for .NET v2009. The same number of points are rendered before and after pressing the button.
I can't reproduce this issue in the latest publicly available version of TeeChart.Silverlight.dll within TeeChart for .NET v2009. The same number of points are rendered before and after pressing the button.
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/