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
Graph Template
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);
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);
Pep Jorge
http://support.steema.com
http://support.steema.com
Dynamic Chart
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
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
Dyanamic Charts
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
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
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi,
There are further coded examples in the "Features Demo" under All Features -> Welcome! -> Datasets.
Please read "Tutorial 8 - ADO.NET Database access" for detailed information on how to achieve this.and this dose not work, I am trying to assign the DataSet to the Series(0).DataSource.
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/
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/