GLG Toolkit, C / C++ API Library  Version 4.6
Chart Filter

This callback may be used to implement a custom chart filter. More...

Detailed Description

This callback may be used to implement a custom chart filter.

Typedefs

typedef GlgLong(* GlgChartFilter) (GlgChartFilterCBReason reason, GlgChartFilterData *filter_data, void *client_data)
 A custom chart filter callback installed via GlgSetChartFilter. More...
 

Typedef Documentation

◆ GlgChartFilter

typedef GlgLong(* GlgChartFilter) (GlgChartFilterCBReason reason, GlgChartFilterData *filter_data, void *client_data)

A custom chart filter callback installed via GlgSetChartFilter.

This function is invoked by a chart to aggregate the plot's data to display a smaller number of data samples.

Parameters
reasonThe reason the filter is invoked.
filter_dataContains data passed to the filter by the chart.
client_dataContains client data passed to the filter by the application when the filter was attached.
Returns
Return value that is interpreted differently depending on the reason parameter.

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, AVERAGE and DISCARD), and contains detailed explanation of all possible values of the reason parameter, as well as the fields of the filter_data structure.