Datasource of Silverlight Teechart

TeeChart Beta versions
Post Reply
Anil Kumar
Newbie
Newbie
Posts: 18
Joined: Tue Sep 04, 2007 12:00 am

Datasource of Silverlight Teechart

Post by Anil Kumar » Tue Feb 10, 2009 9:35 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 10, 2009 2:05 pm

Hi Priya,

Have you tried something as Christopher Ireland's example here?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Anil Kumar
Newbie
Newbie
Posts: 18
Joined: Tue Sep 04, 2007 12:00 am

Post by Anil Kumar » Wed Feb 11, 2009 4:50 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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 12, 2009 11:22 am

Hi Anil,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Anil Kumar
Newbie
Newbie
Posts: 18
Joined: Tue Sep 04, 2007 12:00 am

Post by Anil Kumar » Mon Feb 16, 2009 12:07 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Feb 18, 2009 9:36 am

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:

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; }
    }
  }
I'll send you an e-mail, to your forums contact e-mail address, with the URL to download the version.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Anil Kumar
Newbie
Newbie
Posts: 18
Joined: Tue Sep 04, 2007 12:00 am

Post by Anil Kumar » Mon Feb 23, 2009 4:23 am

Hi Narcis,

Can you please resend the Download URL at new email-id?
I have updated the email address. Earlier it was resalers's email address.

Thanks,
Priya

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 23, 2009 8:20 am

Hi Priya,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Anil Kumar
Newbie
Newbie
Posts: 18
Joined: Tue Sep 04, 2007 12:00 am

Post by Anil Kumar » Mon Feb 23, 2009 8:50 am

Thanks alot, Narcis.
The SilverLight Teechart binding with ObservableCollection is working fine now :D

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 24, 2009 9:36 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply