I would like to use the Editor to allow the user to select the chart style, add one or more series, and setup other chart parameters at runtime. How can we do this? The data used by all series in the chart will be provided by a DataTable or DataSet containing the data. Any samples for doing this?
Thanks,
W
Runtime assignment of data source and chart style.
Hi,
tChart1.ShowEditor();
You can use the following line to show the Editor at runtime :I would like to use the Editor to allow the user to select the chart style, add one or more series, and setup other chart parameters at runtime. How can we do this?
tChart1.ShowEditor();
Please see “Tutorial8 – ADO.NET Database Access” for some runtime examples.The data used by all series in the chart will be provided by a DataTable or DataSet containing the data. Any samples for doing this?
Pep Jorge
http://support.steema.com
http://support.steema.com
Thank you Pep, but the example assumes that the application knows the type of chart/series the user needs and the columns that will be used for the series.
Let me clarify my scenario. In my application, the user queries the database for some information. The information retrieved is returned in a DataTable or a DataSet. The table or columns retrieved are only known after the data is retrieved. At this point, the user decides to create a chart for the data returned. The application provides an empty chart and allows the user to open the chart editor. The user now should be able to use the chart editor to add series and assign the XY columns from the data.
I would like to attach the retrieved DataSet or DataTable to the chart or editor such that the user could select the table and XY columns. I have not found an example or documentation that will allow the chart editor to display the table information to the user.
Could you provide an example on how to do this?
Thanks for your help,
W
Let me clarify my scenario. In my application, the user queries the database for some information. The information retrieved is returned in a DataTable or a DataSet. The table or columns retrieved are only known after the data is retrieved. At this point, the user decides to create a chart for the data returned. The application provides an empty chart and allows the user to open the chart editor. The user now should be able to use the chart editor to add series and assign the XY columns from the data.
I would like to attach the retrieved DataSet or DataTable to the chart or editor such that the user could select the table and XY columns. I have not found an example or documentation that will allow the chart editor to display the table information to the user.
Could you provide an example on how to do this?
Thanks for your help,
W
Hello W,
The Chart Editor 'Series':'Datasource' tab will open with the Dataset fields selected if you predefine the fileds before opening the Editor. If not the person using the editor needs to go to the Series Datasource tab and select the fields they wish to display.
To make this easier you could pre-define a Series type and the display-fields at codetime when the Dataset is selected based on the number and types of fields returned. That will give a 'best estimate' choice to the user to ease their further configuration.
If the Chart Editor offers too much complexity for the selection you wish to offer you could build your own Editor.
A review of coding options for Datasets are included in the TeeChart demo under: 'All features':'Datasets'.
Regards,
Marc Meumann
Steema Support
The Chart Editor 'Series':'Datasource' tab will open with the Dataset fields selected if you predefine the fileds before opening the Editor. If not the person using the editor needs to go to the Series Datasource tab and select the fields they wish to display.
To make this easier you could pre-define a Series type and the display-fields at codetime when the Dataset is selected based on the number and types of fields returned. That will give a 'best estimate' choice to the user to ease their further configuration.
If the Chart Editor offers too much complexity for the selection you wish to offer you could build your own Editor.
A review of coding options for Datasets are included in the TeeChart demo under: 'All features':'Datasets'.
Regards,
Marc Meumann
Steema Support