GLG Toolkit, Java Class Library  Version 4.5

A custom chart filter used to aggregate a chart plot's data. More...

Detailed Description

A custom chart filter used to aggregate a chart plot's data.

The filter is installed via SetChartFilter. The filter's methods are invoked by the chart to aggregate its plot data to display a smaller number of data samples.

The src subdirectory of the GLG installation contains source code of custom filter examples for various programming environments (CustomChartFilter.c, CustomChartFilter.java and CustomChartFilter.cs) that provide extensive self-documented examples of custom filters.

Each example implements several types of custom filters (MIN_MAX_FILTER, AVERAGE_FILTER and DISCARD_FILTER), and contains detailed explanation of the chart filter methods as well as members of the filter_data object.

Public Member Functions

void AddSample (GlgChartFilterData filter_data, Object client_data)
 Custom chart filter method, invoked to supply a next data sample to filter. More...
 
void Finish (GlgChartFilterData filter_data, Object client_data)
 Custom chart filter method, invoked after drawing plot's data. More...
 
int Flush (GlgChartFilterData filter_data, Object client_data)
 Custom chart filter method, invoked before starting a new filter interval (defined by the filter precision) to flush accumulated aggregate data for the previous interval. More...
 
int Start (GlgChartFilterData filter_data, Object client_data)
 Custom chart filter method, invoked before drawing plot's data. More...
 

Member Function Documentation

◆ AddSample()

void AddSample ( GlgChartFilterData  filter_data,
Object  client_data 
)

Custom chart filter method, invoked to supply a next data sample to filter.

Parameters
filter_dataFilter data containing input data and accumulated aggregate values.
client_dataData provided by the application when the filter was attached.

◆ Finish()

void Finish ( GlgChartFilterData  filter_data,
Object  client_data 
)

Custom chart filter method, invoked after drawing plot's data.

Parameters
filter_dataFilter data containing input data and accumulated aggregate values.
client_dataData provided by the application when the filter was attached.

◆ Flush()

int Flush ( GlgChartFilterData  filter_data,
Object  client_data 
)

Custom chart filter method, invoked before starting a new filter interval (defined by the filter precision) to flush accumulated aggregate data for the previous interval.

Parameters
filter_dataFilter data containing input data and accumulated aggregate values.
client_dataData provided by the application when the filter was attached.
Returns
Must returns one of the following values:
  • SKIP_DATA to indicate there are no accumulated data to plot
  • USE_DATA1 to indicate the accumulated data are to be plotted as a single data sample
  • USE_DATA2 to indicate the accumulated data are to be plotted as two data samples.

◆ Start()

int Start ( GlgChartFilterData  filter_data,
Object  client_data 
)

Custom chart filter method, invoked before drawing plot's data.

Parameters
filter_dataFilter data containing input data and accumulated aggregate values.
client_dataData provided by the application when the filter was attached.
Returns
Must return the CHART_FILTER_VERSION constant.