How can I get the Datasource of a seies?
I don't want DatasetName.
I think XLabelsSource will get the columnname or FieldName .
but there is no YLabelsSource function.
I want to get X-axis and Y-axis datasource for a series
from the Series Name.
How is this possible?
How do I know Datasource of a series
Hi.
By accessing TChartSeries.DataSource property. It can point to other series, table, query, ...How can I get the Datasource of a seies?
Not from series name, but rather from XValues.ValueSource and YValues.Valuesource properties. ExampleI want to get X-axis and Y-axis datasource for a series from the Series Name.
Code: Select all
var XFieldName, YFieldName: String;
XFieldName := Series1.XValues.ValueSource;
YFieldName := Series1.YValues.ValueSource;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
How to get dataset X,y axis firld names.
But
Series1.XValues.ValueSource;
and
Series1.YValues.ValueSource;
returns the fieldname only when DAtasource is assigned to Dataset in the design time.
If the Datasource is set to random values in the desing time and datasource is assigned as dataset in the runtime, the above functions are not giving the results.
What is the solution.
Series1.XValues.ValueSource;
and
Series1.YValues.ValueSource;
returns the fieldname only when DAtasource is assigned to Dataset in the design time.
If the Datasource is set to random values in the desing time and datasource is assigned as dataset in the runtime, the above functions are not giving the results.
What is the solution.
Correct. You also have to connect series XValues and Yvalues ValueSource to appropriate dataset fields. This cannot be done automaticaly. Of course, the same goes for design time - you still have to define fields for YValues, XValues and optionally, XLabels. So, when you connect series to dataset at runtime, you must use the following code:If the Datasource is set to random values in the desing time and datasource is assigned as dataset in the runtime, the above functions are not giving the results.
Code: Select all
Series1.XValues.ValueSource := XFieldName;
Series1.YValues.ValueSource := YFieldName;
Series1.DataSource := Table1;
Series1.CheckDataSource;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com