Page 1 of 1

Graph Template

Posted: Mon Jul 12, 2004 12:59 am
by 8121217
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

Posted: Mon Jul 12, 2004 8:47 am
by Pep
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);

Dynamic Chart

Posted: Mon Jul 12, 2004 11:56 pm
by 8121217
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

Dyanamic Charts

Posted: Tue Jul 13, 2004 12:54 am
by 8121217
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

Posted: Tue Jul 13, 2004 6:32 am
by Chris
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.