Graph Template

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
motupal
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am
Location: auckland

Graph Template

Post by motupal » Mon Jul 12, 2004 12:59 am

Hi,

What I am after is to generate graphs based on the parameters, for example if I pass the parameter, as Pie Chart and some values the web page should display the pie graph.

Example:

ShowGraph(PieChart,100,233) this will display pie chart
ShowGraph(BarChart,100,233) this will display Bar chart

and so on. (show graph is only an example)

Just wondering if this possible, generate different graphs example Bar, Pie etc etc, with parameters from the same interface. What I am intending to have is a template which would generate all types of graphs based on the parameters from the same template.


Thanks for your help in advance.

Regards
motupal

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jul 12, 2004 8:47 am

Hi motupal,

yes, this can be done. You can create your custom procedure where you pass the parameters of the Series type, and data to add. And there you can use the Clear method to clear the Chart and create dinamically the Series Type depending on the parameter and add the data the it.
You can create the Series dinamically with the following code :
tChart1.Series.Add(new Steema.TeeChart.Styles.Line());
and use it like :
tChart1.Series[0].FillSampleValues(10);

motupal
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am
Location: auckland

Dynamic Chart

Post by motupal » Mon Jul 12, 2004 11:56 pm

Hi Pep,

Thanks for the mail, can you provide a more detailed example, I cant find the Series method of tChart1. (example tChart1.Series)

I am doing this in VB.Net.

Thanks for your help.

Kind Regards
pmotupal

motupal
Newbie
Newbie
Posts: 3
Joined: Fri Nov 15, 2002 12:00 am
Location: auckland

Dyanamic Charts

Post by motupal » Tue Jul 13, 2004 12:54 am

Hi,

I have tried your example it work with this code:

tChart1.Series.Add(new Steema.TeeChart.Styles.Line());
tChart1.Series[0].FillSampleValues(10);

What I am trying is ??

ChartLogins.Chart.Series.Clear()
ChartLogins.Chart.Series.Add(New Steema.TeeChart.Styles.Bar())
ChartLogins.Chart.Series(0).DataSource = dsRecordsDataSet ChartLogins.Chart.Series(0).Color = cColor

and this dose not work, I am trying to assign the DataSet to the Series(0).DataSource.

Please help.

Kind Regards
pmotupal

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Jul 13, 2004 6:32 am

Hi,
and this dose not work, I am trying to assign the DataSet to the Series(0).DataSource.
Please read "Tutorial 8 - ADO.NET Database access" for detailed information on how to achieve this.

There are further coded examples in the "Features Demo" under All Features -> Welcome! -> Datasets.
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/

Post Reply