Hide Comments
Hide Comments

TRSEQChartValues Class

Comments (0)

Extends the FMX.RS.ChartPanel.TRSChartValues class to define the set of equalizer bars or frequencies that make up the equalizer chart. Each EQ chart is made up of a collection of EQ bars (TRSEQChartValues), where each RSCharts|TRSEQChartValue descendant defines one EQ bar (or frequency) for the chart. The TRSEQChartValue class manages the frequency level (in the Value property) as well as the High value for the frequency. The EQChartValues class is used by the RSCharts|TRSEQChart component.

Note that the TRSEQChartValues collection provides built-in support for limiting the number of values in the collection (using the Limit property).

Namespace: FMX.RS.Charts

expandingInheritance Hierarchy

TGCollection
  FMX.RS.ChartPanel.TRSChartValues
    FMX.RS.Charts.TRSEQChartValues
 

expandingSyntax

Delphi

type
  TRSEQChartValues = class(TRSChartValues)
  end; 
 

expandingConstructors
expandingProperties

 

Name

Description

public property

AbsSum

Returns the sum of the absolute values of the first dimension of the values in the chart. The  AbsSums property returns the absolute sum for any dimension in the chart (see  DimensionCount for more details).
 (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

AbsSums[Integer]

Returns the summation of the absolute values for every dimension of the TRSChartValues in the chart. Use the  DimensionCount property to determine the number of dimensions in the chart value collection. This property is part of the metadata that the collection tracks about the chart values.

A chart value, depending on the chart type, can contain 1 or more dimensional values that define the chart value. For example, each chart value in a bar chart contains 1 value (defining the height of the bar), line chart values contains 2 dimensions: X and Y, and shape chart values contain 4 dimensions: X, Y, Width, and Height. See the Values and ValueCount properties of the TRSChartValue item for more information.
 
 

protected property

DateTimeAxes

Represents property DateTimeAxes. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

DefaultDimension

Returns the  Values dimension that contains the default dimension or key dimension, i.e., the dimension that is most important to a chart. For 1D charts, like a pie chart, this value is 0. For 2D charts, this dimension is usually 1.

Use the  TimeDimension and the  DefaultDimension to find out the "important" dimensions of the TRSChartValue descendant.

noteNote

The RSChartPanel|TRSChartValue.Value property uses this property to figure out which Values dimension to get or set.

public property

DimensionCount

Returns the number of dimensions each Value ( RSChartPanel|TRSChartValue ) will have in the chart.

A chart value, depending on the chart type, can contain 1 or more dimensional values that define the chart value. For example, each chart value in a bar chart contains 1 value (defining the height of the bar), line chart values contains 2 dimensions: X and Y, and shape chart values contain 4 dimensions: X, Y, Width, and Height. The number of dimensions in a chart is defined when the TRSChartValues collection is created. Every time a TRSChartValue item is created, its Values property will be initialized to the size of DimensionCount.
 

protected property

DoNotNotify

Represents property DoNotNotify. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected property

HasCaptions

Specifies that at least one TRSChartValue in the collection has had a Caption assigned to it. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

HighDim

Returns the dimension of the High property of the TRSEQChartValue. Use this property to always access the correct dimension for the High property.
 

public property

IsDateTime

Controls whether the first (or only) dimension should be labeled as a date time or a regular floating point number. When this property is set to True, all the labels for this chart will be drawn as a Date + Time (controlled by the  DateTimeFormat of the axis).
 (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

Items[Integer]

Lists the values in the chart. Use Items to access individual value in the collection. The value of the Index parameter corresponds to the Index property of RSChartPanel|TRSChartValue . It represents the position of the value in the collection.

The Items property is the default property for the class. You can access this property with the abbreviation Values[index], which is equivalent to Values.Items[index].
 
 

published property

Limit

Limits the number of values (or RSChartPanel|TRSChartValue items) in the collection. It provides the chart the ability to limit its size automatically as values are added.

Once the Count property equals the Limit property, every time you Add another value, the 0-th value is deleted. This property makes it easy to ensure your chart values do not grow unbounded and creates an automatic sliding window display ofthe Limit number of points. Note that this is not necessarily the last Limit number of points added, as sorting the values (Sorted) can make which value is deleted unpredictable.

If you want an unlimited number of chart values, set Limit to RSChartConsts|NoLimit .
 

public property

MaxValue

Returns the maximum value of the first dimension of the values in the chart. The  MaxValues property returns the maximum value for any dimension in the chart (see  DimensionCount for more details).
 (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

MaxValues[Integer]

Returns the maximum value for every dimension of the TRSChartValues in the chart. Use the  DimensionCount property to determine the number of dimensions in the chart value collection. This property is part of the metadata that the collection tracks about the chart values.

A chart value, depending on the chart type, can contain 1 or more dimensional values that define the chart value. For example, each chart value in a bar chart contains 1 value (defining the height of the bar), line chart values contains 2 dimensions: X and Y, and shape chart values contain 4 dimensions: X, Y, Width, and Height. See the Values and ValueCount properties of the TRSChartValue item for more information.
 
 

public property

MinValue

Returns the minimum value of the first dimension of the values in the chart. The  MinValues property returns the maximum value for any dimension in the chart (see  DimensionCount for more details).
 (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

MinValues[Integer]

Returns the minimum value for every dimension of the TRSChartValues in the chart. Use the  DimensionCount property to determine the number of dimensions in the chart value collection. This property is part of the metadata that the collection tracks about the chart values.

A chart value, depending on the chart type, can contain 1 or more dimensional values that define the chart value. For example, each chart value in a bar chart contains 1 value (defining the height of the bar), line chart values contains 2 dimensions: X and Y, and shape chart values contain 4 dimensions: X, Y, Width, and Height. See the Values and ValueCount properties of the TRSChartValue item for more information.
 
 

protected property

NeedMetaUpdate

Signals that metadata is out of date and needs to be recalculated by calling the CalculateMetaData method (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected property

NumDimensions

Specifies the number of dimensions the TRSChartValue's have. The number of dimensions specify the size of the  TRSChartValue.Values property and corresponds to all the floating point properties of a value (e.g., X, Y, Z, Width, Height, Size, etc). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

SelCount

Returns the number of  selected values in the collection (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

SortByDimension

Controls which dimension is used to sort the items in the collection (when  Sorted is True).

A chart value, depending on the chart type, can contain 1 or more dimensional values that define the chart value. For example, each chart value in a bar chart contains 1 value (defining the height of the bar), line chart values contains 2 dimensions: X and Y, and shape chart values contain 4 dimensions: X, Y, Width, and Height. The SortByDimension allows you to sort the items by the dimension (X usually but it could be Width in a shape chart, Level in a graph chart, etc). See the  Values and  ValueCount properties of the TRSChartValue item for more information.
 

published property

Sorted

Controls whether the values of the chart are sorted or not.

Set the Sorted property to True to force all values to be sorted in the collection based on the  SortByDimension and  SortOrder properties. When this property is False, the values are in the order that they were added or inserted into the collection (see Add or Insert methods).

published property

SortOrder

Controls whether the items are sorted in ascending or descending order. The FMX.RS.ChartPanel.TRSChartValues.SortByDimension property controls which values are used to do the sorting. The FMX.RS.ChartPanel.TRSChartValues.Sorted property controls whether the items will be sorted at all. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

Sum

Returns the summation of the first dimension of the values in the chart. The  Sums property returns the summation for any dimension in the chart (see  DimensionCount for more details).
 (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public property

Sums[Integer]

Returns the summation of the values for every dimension of the TRSChartValues in the chart. Use the  DimensionCount property to determine the number of dimensions in the chart value collection. This property is part of the metadata that the collection tracks about the chart values.

A chart value, depending on the chart type, can contain 1 or more dimensional values that define the chart value. For example, each chart value in a bar chart contains 1 value (defining the height of the bar), line chart values contains 2 dimensions: X and Y, and shape chart values contain 4 dimensions: X, Y, Width, and Height. See the Values and ValueCount properties of the TRSChartValue item for more information.
 
 

public property

TimeDimension

Returns the  Values dimension that contains the time/x/horizontal dimension. For 1D charts, like a pie chart, this value is unassigned (DIMENSION_UNASSIGNED). For 2D charts, this dimension is usually 0.

Use the  TimeDimension and the  DefaultDimension to find out the "important" dimensions of the TRSChartValue descendant.

public property

ValueDim

Returns the dimension of the Value property of the TRSEQChartValue. Use this property to always access the correct dimension for the Value property.
 

public property

VisibleCount

Returns the number of visible values in the collection (  Visible = True) (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

Top

expandingMethods

 

Name

Description

public method

Add

Overloaded.  Creates a new EQ Bar or frequency item ( RSCharts|TRSEQChartValue instance) and adds it to the Items array. The new value is placed at the end of the Items array, or, if the collection is Sorted, placed at the sorted point in the collection.

Add returns the new EQ value.
 

Note that because every time you change a value an event is called, it is faster to add and initialize a value using the overloaded  Add method.
 
 

public method

Add(TRSChartValueType,String,TCanvasColor)

Overloaded.  Creates a new EQ Bar or frequency item ( RSCharts|TRSEQChartValue instance) and adds it to the Items array. The new instance is initialized with the EQ value (High=Value), Caption, and Color parameters. Call Add to create a EQ bar in the collection. The new value is placed at the end of the Items array, or, if the collection is Sorted, placed at the sorted point in the collection.

Add returns the new EQ value.

public method

Add(TRSChartValueType,TRSChartValueType,String,TCanvasColor)

Overloaded.  Creates a new EQ Bar or frequency item ( RSCharts|TRSEQChartValue instance) and adds it to the Items array. The new instance is initialized with the EQ value and High Value, Caption, and Color parameters. Call Add to create a EQ bar in the collection. The new value is placed at the end of the Items array, or, if the collection is Sorted, placed at the sorted point in the collection.

Add returns the new EQ value.
 
 

public method

Add(TRSChartValueType[],String,TCanvasColor)

Overloaded.  Creates a new TRSChartValue instance and adds it to the Items array. The new instance is initialized with the Values, Caption, and Color parameters. Call Add to create a value in the collection. The new value is placed at the end of the Items array, or, if the collection is Sorted, placed at the sorted point in the collection (based on a default value (0)).

Add returns the new value.
 

public method

Append(TRSChartValues)

Appends the Source values to the current collection (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

Assign(TPersistent)

Represents method Assign(TPersistent). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

AssignTo(TPersistent)

Represents method AssignTo(TPersistent). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

CalculateMetaData

Calculates the metadata (e.g., minimums, maximums, summations, and absolute summations) for the entire values collection, for all dimensions.

The metadata is recalculated when values change and the NeedMetaData property is set to true.

public method

Clone

Creates a copy of the values collection. This is a "deep" copy, e.g., all items and their properties are copied. The new collection is returned. The Owner of the collection is the same as the current collection's Owner . Note, you are responsible for freeing the clone. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

CustomSort(TValuesSortCompare)

Sorts the current values collection using the supplied comparison function. Use CustomSort when you want to perform a special type of sorting on the values collection. You need to define a function based on the RSChartPanel|TValuesSortCompare signature.

If you want to do normal sorting, just call the  Sort method.
 

public method

FindClosest(TRSChartValueType)

Returns the Index of the Item that is closest to the Value parameter. FindClosest uses the Values in the sorted dimension (  SortByDimension) to determine the nearest value. If the collection is not sorted, this function returns -1. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

FindItemID(Integer)

Returns the Item with the specified ID. The FindItemID method returns the item in the collection whose ID property is passed to it as a parameter. If no item has the specified ID, FindItemID returns nil.

protected method

GetAbsSum(Integer)

Represents method GetAbsSum(Integer). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

GetAxisMaximum(Integer)

Returns the maximum value in the collection for the specified dimension. (Overrides FMX.RS.ChartPanel.TRSChartValues.GetAxisMaximum(Integer).)

public method

GetAxisMinimum(Integer)

Returns the minimum value in the collection for the specified dimension. (Overrides FMX.RS.ChartPanel.TRSChartValues.GetAxisMinimum(Integer).)

public method

GetEnumerator

Returns the enumerator for the collection, which is used when you write a "for Item in Chart.Values" loop.

protected method

GetIsDateTime

Represents method GetIsDateTime. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

GetMaxValue(Integer)

Represents method GetMaxValue(Integer). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

GetMinValue(Integer)

Represents method GetMinValue(Integer). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

GetSortByDimension

Represents method GetSortByDimension. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

GetSum(Integer)

Represents method GetSum(Integer). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

GetValueDimMaximum(TRSChartValue,Integer)

Returns the maximum value for the dimension. This may be modified by other values. For example, the shape value modifies the X value by adding the width value. This method is called by the  CalculateMetaData method.

alert_noteNotes to Inheritors

Override this method if you need to return a maximum value for a dimension that is depends on other factors than just the value in TRSChartValue.Values[Dimension]. For example, the TRSCandleStickChartValues class overrides this method for the Y dimension because the Y dimension is bounded by the High Dimension and Low Dimension, not the Close value.

You will probably also need to override the  SetMetaData method to set the new maximum.

protected method

GetValueDimMinimum(TRSChartValue,Integer)

Returns the minimum value for the dimension. This may be modified by other values. For example, the shape value modifies the X value by adding the width value. This method is called by the  CalculateMetaData method.

alert_noteNotes to Inheritors

Override this method if you need to return a minimum value for a dimension that is depends on other factors than just the value in TRSChartValue.Values[Dimension]. For example, the TRSCandleStickChartValues class overrides this method for the Y dimension because the Y dimension is bounded by the High Dimension and Low Dimension, not the Close value.

You will probably also need to override the  SetMetaData method to set the new minimum.

public method

IndexOf(TRSChartValueType,Integer)

Returns the Index of the Item that contains the Value parameter (or close to the Value parameter) for the specifed Dimension. If the Collection is sorted by the specified Dimension, IndexOf calls the  FindClosest method. However, if the collection is not sorted or not sorted by the specified Dimension, the method iterates through the collection looking for a value that is approximately equal to the specified Value. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

Insert(Integer)

Creates a new instance and adds it to the Items array. Call Insert to add a new value at a specified position in the collection. Existing items (starting from the specified position) are moved up in the Items array. Note that Insert only works as expected if the collection is not  Sorted.

Insert returns the new collection value.
 

protected method

Loaded

Represents method Loaded. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

Notify(Classes,Classes)

Represents method Notify(Classes,Classes). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

Owner

Returns the chart that owns the values

protected method

QuickSort(Integer,Integer,TValuesSortCompare)

Represents method QuickSort(Integer,Integer,TValuesSortCompare). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

ResetHigh

Resets the High values of all TRSEQChartValue to their current value.

public method

SelectAll

Selects all values in the collection (TRSChartValue.Selected is set to true) (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

SelectionChanged(TRSChartValue)

Represents method SelectionChanged(TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

public method

SelectNone

Deselects all values in the collection (TRSChartValue.Selected is set to false) (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

SetCount(Integer)

Represents method SetCount(Integer). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

SetIsDateTime(Boolean)

Represents method SetIsDateTime(Boolean). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

SetMetaData(TValueMetaData,TRSChartValue,Integer)

Sets the metadata (min, max, sum, etc) by using the TRSChartValue.Values property. The Dimension parameter specifies the dimension to use in the Values property. This method is called by the  CalculateMetaData method when it finds a value "better" than the current metadata value (e.g., less than current minimum)

alert_noteNotes to Inheritors

This method is often overridden when you need to override the  GetValueDimMinimum and  GetValueDimMaximum methods.

public method

Sort

Sorts the current values collection based on the  SortByDimension. You can do custom sorts by using the  CustomSort method. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

Update(TCollectionItem)

Represents method Update(TCollectionItem). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

ValueChanged(TRSChartValue,Integer)

Represents method ValueChanged(TRSChartValue,Integer). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected method

VisibleChanged(TRSChartValue)

Represents method VisibleChanged(TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

Top

expandingEvents

 

Name

Description

public event

OnNotify

Occurs when a TRSChartValue is added, extracted, or removed from the collection. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

Top

expandingFields

 

Name

Description

protected field

FAbsSum

Represents field FAbsSum. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected field

FDefaultDimension

Represents field FDefaultDimension. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected field

FHighDim

Represents field FHighDim.

protected field

FMaxValue

Represents field FMaxValue. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected field

FMinValue

Represents field FMinValue. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected field

FSum

Represents field FSum. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected field

FTimeDimension

Represents field FTimeDimension. (Inherited from FMX.RS.ChartPanel.TRSChartValues.)

protected field

FValueDim

Represents field FValueDim.

Top

expandingSee Also

Comments (0)

RiverSoftAVG Charting Component Suite (RCCS) © 2005-2015, Thomas G. Grubb