Datasource of Silverlight Teechart
-
- Newbie
- Posts: 18
- Joined: Tue Sep 04, 2007 12:00 am
Datasource of Silverlight Teechart
Hi,
I am evaluating TeeChart v4 Silverlight.
What can be the Chartseries Datasource?
I tried to bind Chart Series to ObservableCollection<>, but it doesn't work.
ObservableCollection<Customer> coll = new ObservableCollection<Customer>();
//code to fill the collection.....
Line lineSeries1 = new Line();
tChart1.Series.Add(lineSeries1);
lineSeries1.Title = "line1";
lineSeries1.XValues.DataMember = "Age";
lineSeries1.YValues.DataMember = "Salary";
lineSeries1.DataSource = coll;
Regards,
Priya
I am evaluating TeeChart v4 Silverlight.
What can be the Chartseries Datasource?
I tried to bind Chart Series to ObservableCollection<>, but it doesn't work.
ObservableCollection<Customer> coll = new ObservableCollection<Customer>();
//code to fill the collection.....
Line lineSeries1 = new Line();
tChart1.Series.Add(lineSeries1);
lineSeries1.Title = "line1";
lineSeries1.XValues.DataMember = "Age";
lineSeries1.YValues.DataMember = "Salary";
lineSeries1.DataSource = coll;
Regards,
Priya
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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: 18
- Joined: Tue Sep 04, 2007 12:00 am
Hi Narcis,
No, I am not trying as Christopher Ireland's example.
I simply want to bind the datasource to Silverlight Teechart.
Since Silverlight does not have ADO.Net, Silverlight Teechart can not be binded to Dataset. That's why I am trying to bind it to ObservableCollection. But the chart doesn't get plotted.
What can be other possible datasources for Silverlight Teechart?
Any feedback would be appreciated.
Regards,
Priya
No, I am not trying as Christopher Ireland's example.
I simply want to bind the datasource to Silverlight Teechart.
Since Silverlight does not have ADO.Net, Silverlight Teechart can not be binded to Dataset. That's why I am trying to bind it to ObservableCollection. But the chart doesn't get plotted.
What can be other possible datasources for Silverlight Teechart?
Any feedback would be appreciated.
Regards,
Priya
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anil,
Thanks for the information. I see we already spoke about this issue here. There are no news about this yet.
Thanks for the information. I see we already spoke about this issue here. There are no news about this yet.
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: 18
- Joined: Tue Sep 04, 2007 12:00 am
Sorry, Narcis. I guess there is some confusion.
I already have TeeChart v4 Silverlight beta provided by Steema Sales team. API documentation is not provided with it.
Isn't there way to bind Silverlight Teechart with some datasource? If yes, What are the datasources which can be bound?
Regards,
Priya
I already have TeeChart v4 Silverlight beta provided by Steema Sales team. API documentation is not provided with it.
Isn't there way to bind Silverlight Teechart with some datasource? If yes, What are the datasources which can be bound?
Regards,
Priya
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Priya,
Yes, but at that thread I was also speaking about v4 Silverlight beta as there's no Silverlight version of TeeChart for .NET v3. v4's beta is the first TeeChart Silverlight version available. Anyway, a new beta has been uploaded at our website which accepts objects of type ObservableCollection<T> for Series DataSource. Here's an example:
I'll send you an e-mail, to your forums contact e-mail address, with the URL to download the version.
Yes, but at that thread I was also speaking about v4 Silverlight beta as there's no Silverlight version of TeeChart for .NET v3. v4's beta is the first TeeChart Silverlight version available. Anyway, a new beta has been uploaded at our website which accepts objects of type ObservableCollection<T> for Series DataSource. Here's an example:
Code: Select all
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Silverlight.Styles.Bar bar;
private NameList observable;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(bar = new
Steema.TeeChart.Silverlight.Styles.Bar());
bar.XValues.DataMember = "DateOfBirth";
bar.YValues.DataMember = "Height";
bar.LabelMember = "LastName";
bar.ColorMember = "FavoriteColor";
observable = new NameList();
bar.DataSource = observable;
}
}
public class NameList : ObservableCollection<Person>
{
public NameList()
: base()
{
Add(new Person("Willa", "Cather", DateTime.Parse("22/09/1941"), Colors.Red, 171));
Add(new Person("Isak", "Dinesen", DateTime.Parse("01/07/1964"), Colors.Green, 189));
Add(new Person("Victor", "Hugo", DateTime.Parse("30/03/1987"), Colors.Blue, 196));
Add(new Person("Jules", "Verne", DateTime.Parse("14/10/1995"), Colors.Orange, 175));
}
}
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; }
}
}
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: 18
- Joined: Tue Sep 04, 2007 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Priya,
Sure, no problem. Just resent the e-mail to your new address.
Sure, no problem. Just resent the e-mail to your new address.
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: 18
- Joined: Tue Sep 04, 2007 12:00 am
Thanks alot, Narcis.
The SilverLight Teechart binding with ObservableCollection is working fine now
Can I get beta download for Teechart .NET 4 for WPF as well?
I have WPF Teechart .NET version 3 which does not support ObservableCollection. We are creating controls for Silverlight and WPF whose API going to be same.
Thanks,
Priya
The SilverLight Teechart binding with ObservableCollection is working fine now
Can I get beta download for Teechart .NET 4 for WPF as well?
I have WPF Teechart .NET version 3 which does not support ObservableCollection. We are creating controls for Silverlight and WPF whose API going to be same.
Thanks,
Priya
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Priya,
Such beta doesn't exist at the present moment. A beta version of the next TeeChart for .NET major upgrade release, will be made available early March.
Such beta doesn't exist at the present moment. A beta version of the next TeeChart for .NET major upgrade release, will be made available early March.
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 |