Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2233 - Add Filters in TSeriesTextSource
Summary: Add Filters in TSeriesTextSource
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Other Components (show other bugs)
Version: 27.190530
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: https://www.steema.com/support/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-02 09:15 EDT by yeray alonso
Modified: 2019-09-02 09:15 EDT (History)
0 users

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2019-09-02 09:15:24 EDT
When you set a TSeriesTextSource to load the values from a text file (ie a .csv), you can set what Columns or Fields to add. Ie:

  with SeriesTextSource1 do
  begin
    HeaderLines:=1;
    FileName := 'Na-Mg-K.csv';
    FieldSeparator:=',';
    Fields.Clear;

    AddField('X',3);
    AddField('Y',4);
    AddField('Z',5);
    AddField('Radius',6);
    AddField('Weighting',7);
    AddField('Text',8);

    Load;
  end;

We could add the option to add Filters to only load rows which column (or field) X has (or hasn't) value Y. Ie:

  AddFilter(1,'AT-303',Equal);  // Loads rows with field 1 = 'AT-303'

  AddFilter(1,'AT-305',Different); 
  AddFilter(1,'AT-602',Different); // Loads rows with field 1 <> 'AT-305' and <> 'AT-602'

  AddFilter(7,'5',Greater);
  AddFilter(7,'9',Smaller);  // Loads rows with field 7 > '5' and < '9'