I am attempting to use the graphical interface to set a gauge to use a text file as the datasource.
I set the source to text file, selected my text file, set the corresponding column numbers to the Text,Y,Angle fields.
No matter what I do, I can not get the gauge to read the file. Is there a bit of code I need to add in conjunction with the settings in the GUI?
My text file is simply 0 25 delimited by a tab. Is this the correct format? I set the Angle value to 1, and the Y value to 2.
How can I get this gauge to register the value.
Gauge datasource from text (txt) file
Re: Gauge datasource from text (txt) file
Hello phil1995,
I can achieve to load data in the Gauge Series with TextField in design time and run time and I recommend follow next steps to achieve the same results:
Design time:
1.- Add Series (Gauges) in the Chart.
2.- Go to Tab Series\DataSource and Select TextField
3.- Select text file are you want load.
4.- Add in Y value 0
5.- Click apply.
Run Time:
And also I think would be interesting for you, take a look in next code, where the data are load from TextFile:
I hope will helps.
Thanks,
I can achieve to load data in the Gauge Series with TextField in design time and run time and I recommend follow next steps to achieve the same results:
Design time:
1.- Add Series (Gauges) in the Chart.
2.- Go to Tab Series\DataSource and Select TextField
3.- Select text file are you want load.
4.- Add in Y value 0
5.- Click apply.
Run Time:
And also I think would be interesting for you, take a look in next code, where the data are load from TextFile:
Code: Select all
private void InitializeChart()
{
Steema.TeeChart.Styles.CircularGauge Series1 = new CircularGauge(tChart1.Chart);
Steema.TeeChart.Data.TextSource ts = new Steema.TeeChart.Data.TextSource(@"C:\tmp\Gauge.txt");
ts.HeaderLines = 0;
ts.Separator = ',';
ts.Fields.Add(0, "Y");
Series1.DataSource = ts;
}
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |