ChartDirector 7.1 (.NET Edition)

Chart.StartOfMinuteFilter


Usage

[C#]public static int StartOfMinuteFilter([ int labelStep [, double initialMargin ]]);
[VB]Public Shared Function StartOfMinuteFilter([ labelStep As Integer [, initialMargin As Double ]]) As Integer

Description

Creates a data filter that matches date/times that represent the start of a new minute in a date/time series.

This method is typically used in Axis.setMultiFormat and Axis.setMultiFormat2 to select specific dates/times for formatting as axis labels.

In a date/time series, an element is considered that start of a new minute if it is of a different minute than the previous element. It does not need to be at exactly the starting instance of the minute.

For the first element of the date/time series, because there is no previous element to compare with, it will be considered as the start of a new minute if it is "near" the exact starting instance of the current minute, in which "near" is defined using the initialMargin argument, expressed as a ratio (0 to 1) of the minute duration.

Arguments

ArgumentDefaultDescription
labelStep1For dates/times that matches the start of minute criteria, picks only 1 out of every "labelStep" number of elements. For example, if this argument is 3, only 1 of every 3 elements that at at the start of minute will be selected.
initialMargin0.05If the first label is "near" the exact starting instance of the current minute to within the ratio specified in the initial margin, it will be considered to have matched the start of minute criteria.

Return Value

An integer filter id representing the filter.