The TRSEQChart component is a FMX.RS.Charts.TRSChart descendant that provides an "equalizer" visualization. The TRSEQChart is similar to a bar chart ( FMX.RS.BarCharts.TRSBarChart ) where every bar is made up of blocks and there are high water marks for each bar (think of a music equalizer). The EQ Chart displays each chart value ( FMX.RS.BarCharts.TRSEQChartValue ) by as a vertical or horizontal bar (depending on
Orientation), broken up into equal size blocks (except possibly the last block). Each value draws a separate bar and the order of the bars is based on the order of the TRSEQChartValue in the collection
Namespace: FMX.RS.BarCharts
TControl |
Delphi |
type |
|
|
(Inherited from FMX.RS.ChartPanel.TRSCustomChart.) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Draw(TCanvas,TCanvasRect,TRSChartAxis,TRSChartAxis,Boolean,Boolean) |
Overloaded. Paints the chart to the specified Canvas in the specified location. The Draw Method uses the supplied TRSChartAxis (instead of the HorizontalAxis and VerticalAxis properties) to convert the chart values into pixel coordinates. Unlike the regular Draw method, this method draws the axes as well (useful for when the chart is not connected to a panel). Use the Draw method to paint the chart to any canvas and anywhere and with any size on the canvas. |
(Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
DrawAxes(TCanvas,TCanvasRect,TRSChartAxis,TRSChartAxis)
Draws the specified axes to the Canvas (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
DrawBar(TCanvas,TCanvasRect,TCanvasRect,TRSEQChartValue)
Overloaded. Draw one bar of the equalizer chart depending on the Style
DrawEQBar(TCanvas,TCanvasRect,TCanvasRect,TRSChartValueType,TCanvasColor,Single)
Draw one equalizer bar with the classic equalizer style of it being broken up into smaller bars, specified by the Subdivisions
DrawGlyph(TCanvas,TCanvasRect)
Overloaded. Represents method DrawGlyph(TCanvas,TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
DrawGlyph(TCanvas,TRSChartValue,TCanvasRect)
Represents method DrawGlyph(TCanvas,TRSChartValue,TCanvasRect). (Overrides FMX.RS.BarCharts.TRSCustomBarChart.DrawGlyph(TCanvas,TRSChartValue,TCanvasRect).)
DrawHighMark(TCanvas,TCanvasRect,TCanvasRect,TRSChartValueType)
Draw the high mark for the value
Calls the OnDrawing event and returns True if the draw process should continue.
This method is called before the InternalDraw method.
DrawLabel(TCanvas,String,TCanvasPixel,TCanvasPixel,Single)
Overloaded. Draws the text caption centered above the X, Y point without clipping.
Note |
---|
The Opacity is ignored in VCL |
DrawLabel(TCanvas,String,TCanvasRect,Single)
Overloaded. Draws the text caption centered within the rectangle. The text is clipped
Note |
---|
The Opacity is ignored in VCL |
DrawLabel(TCanvas,TRSChartValue,TCanvasPixel,TCanvasPixel)
Overloaded. Draws the text caption centered above the X, Y point without clipping.
Note |
---|
The Opacity is specified by the FMX.RS.ChartPanel.TRSChartValue.Opacity property |
DrawLabel(TCanvas,TRSChartValue,TCanvasRect)
Overloaded. Draws a label for the TRSChartValue on the canvas. The text of the label is controlled by the ValueLabelStyle property.
The label is drawn within the specified rectangle.
Note |
---|
The Opacity is specified by the FMX.RS.ChartPanel.TRSChartValue.Opacity property |
Calls the OnDraw event.
This method is called after the InternalDraw method.
Re-enables screen repainting and change events. Use EndUpdate to re-enable screen repainting and change events that were turned off with the BeginUpdate method. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
FormatValue(TRSChartValue,TRSLabelTextStyle)
Generates a label for the Value based on the TextStyle (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Returns the vertical offset ( OffsetVertical).
If coUseVerticalOffset is not in Options, this method always returns 0. If coUseVerticalOffset is in Options, the function returns the OffsetVertical value.
Returns the adjusted origin for the bar chart. If the UseOriginproperty is set, this value is the Origin. If the UseOrigin property is false, the adjusted origin equals 0.
Note that when bar charts are stacked (see GroupStyle=gsStacked), the bottom-most bar chart adjusted origin is used as the origin for all the bar charts.
GetAxisCaption(TRSChartAxis,Integer,TRSChartValueType)
Returns a label for an axis ( FMX.RS.ChartPanel.TRSChartAxis ) based on the input Value. The Index specifies where to start looking in the chart Values (for optimization purposes) and decrements from there until the closest chart value is found. (Overrides FMX.RS.BarCharts.TRSCustomBarChart.GetAxisCaption(TRSChartAxis,Integer,TRSChartValueType).)
GetBarRect(TCanvasRect,TRSBarChartValue)
Overloaded. Returns the canvas rectangle in pixels for the bar value (Inherited from FMX.RS.BarCharts.TRSCustomBarChart.)
Returns the canvas rectangle in pixels for the bar value. (Overrides FMX.RS.BarCharts.TRSCustomBarChart.GetBarRect(TCanvasRect,TRSBarChartValue,TRSCustomChart,TRSChartValueType,TRSChartValueType,TRSChartValueType).)
Returns the bar style of the value (Inherited from FMX.RS.BarCharts.TRSCustomBarChart.)
Returns the chart type enumerated value for this class. Each chart class overrides this class function to return the RSChartConsts|TRSChartType enumerated value (Overrides FMX.RS.BarCharts.TRSCustomBarChart.GetChartType.)
Overloaded. Represents method GetColor. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Overloaded. Returns the color of the chart value. The color of the TRSChartValue can change depending on the Options property as well as any other chart states (e.g., the TRSCandleStickChart class overrides this method to turn the color red or green depending on if the Open value is greater than the Closing Value) (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
GetCumulativeTotal(Integer,Integer,TRSCustomChartClass)
Determine the cumulative value at this index for all charts in the Group. The ValIndex specifies the TRSChartValue.Values dimension to compare.
Used for stacking charts.
GetCumulativeValue(Integer,Integer,TRSCustomChartClass)
Determine the cumulative value at this index for all charts below (spatially) this chart in the same Group. The ValIndex specifies the TRSChartValue.Values dimension to compare.
Used for stacking charts.
Represents method GetGroupDimension. (Overrides FMX.RS.ChartPanel.TRSCustomChart.GetGroupDimension.)
Returns a new chart color based on the ChartColorScheme and ChartColorList. Every time a chart is created, it is assigned a new color from the current ChartColorList. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Initialize the OnChange events of structures. Use this method to assign event handlers for structures (e.g., Pen.OnChange := MyChangeMethod).
Notes to Inheritors |
---|
The constructor calls this method after it calls the InitializeChart method, which is where the structures should be actually created and initialized. |
Creates and initialize structures and values of chart. This method is the safe place to initialize chart values without change events occurring.
Notes to Inheritors |
---|
The constructor calls this method. Use this method to actually create and initialize properties. Do not assign event properties in this method (use the InitializeChangeEvents method instead) |
InternalDraw(TCanvas,TCanvasRect)
Overloaded. Paints the chart graphic to the specified canvas at the specified rectangle. The InternalDraw method is called by the Draw method.
Descendant classes of TRSCustomChart override the InternalDraw method to actually paint themselves.
Notes to Inheritors |
---|
The default InternalDraw method implementation assigns the Brush, Pen , and Font to the Canvas. |
InternalSelect(TCanvasRect,TRSChartSelectionAction)
Selects or deselects chart Values ( FMX.RS.ChartPanel.TRSChartValue ) based on whether they intersect with the selection rectangle (which is in pixel coordinates).
The base method converts the SelectionRect to chart coordinates (based on HorizontalAxis and VerticalAxis) and then selects values based on the TRSChartValue.Selectable method
Represents method Invalidate. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Returns True if any value in the chart intersects with the SelectionRect (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method IsValuesStored. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Indicates whether the chart is visible. A chart is visible if its Visible property is True and both axes have been assigned. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method Loaded. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method MouseHover(TCanvasRect). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Notification(TComponent,TOperation)
Represents method Notification(TComponent,TOperation). (Overrides FMX.RS.ChartPanel.TRSCustomChart.Notification(TComponent,TOperation).)
Represents method Paint. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method PanelChanged. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method RSVisibleChanged. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
SaveCanvasResources(TCanvas,TBrush,TRSPen,TFont)
Represents method SaveCanvasResources(TCanvas,TBrush,TRSPen,TFont). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Select(TCanvasRect,TRSChartSelectionAction)
Selects or deselects chart Values ( FMX.RS.ChartPanel.TRSChartValue ) based on whether they intersect with the selection rectangle (which is in pixel coordinates).
The base method converts the SelectionRect to chart coordinates (based on HorizontalAxis and VerticalAxis) and then selects values based on the TRSChartValue.Selectable method
Notes to Inheritors |
---|
Descendant classes override the InternalSelect method |
Represents method SelectionColorChanged. (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Overloaded. Represents method SenderChanged(TObject). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
SetCanvasResources(TCanvas,TBrush,TRSPen,TFont,Boolean,Boolean)
Overloaded. Represents method SetCanvasResources(TCanvas,TBrush,TRSPen,TFont,Boolean,Boolean). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
SetCanvasResources(TCanvas,TRSChartValue,Boolean,Boolean)
Represents method SetCanvasResources(TCanvas,TRSChartValue,Boolean,Boolean). (Overrides FMX.RS.ChartPanel.TRSCustomChart.SetCanvasResources(TCanvas,TRSChartValue,Boolean,Boolean).)
Represents method SetColor(TCanvasColor). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method SetOptions(TChartOptions). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method SetVisible(Boolean). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Represents method UpdateAxisInfo(TRSChartAxis). (Overrides FMX.RS.ChartPanel.TRSCustomChart.UpdateAxisInfo(TRSChartAxis).)
Updates the values to the current color scheme. If PanelColorScheme is True then uses the Panel's color scheme (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
ValueSelectionChanged(TRSChartValue)
Represents method ValueSelectionChanged(TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
ValueVisibleChanged(TRSChartValue)
Represents method ValueVisibleChanged(TRSChartValue). (Inherited from FMX.RS.ChartPanel.TRSCustomChart.)
Returns true if the chart prefers Captions over Values for its labels on the input Axis. This method provides a hint to the TRSChartAxis when LabelStyle is alsAutomatic. (Overrides FMX.RS.ChartPanel.TRSCustomChart.WantsCaptions(TRSChartAxis).)
|
To display a chart, you drop the component on a form and optionally connect its Panel property to the FMX.RS.ChartPanel.TRSChartPanel component where you want it to be displayed. The Values property is the most important property of the chart type and allows you to define the chart values at design-time or run-time. For the EQ Chart, the Values property contains TRSEQChartValue collection items which define the Value or Height of the Bar and its High water mark. To display a equalizer chart inside a chart panel: • Drop a TRSEQChart component on a form • Drop a TRSChartPanel component where you want the chart to be displayed. (Note, more than one chart can share the same chart panel) • Connect the Panel property of the chart to the chart panel |
To add a equalizer bar to the chart (at Design-Time):
• Select the TRSEQChart component • Click the ellipsis button (...) for the Values property of the chart. This action displays Delphi's Collection Editor for the TRSEQChartValues collection. • Use the Add button to add equalizer bars (TRSEQChartValue collection item) to the chart. • Edit the Value property for the height of the bar (or the width, depending on Orientation) • Optionally, edit the High property for the maximum previous height of the bar |
To add a equalizer bar to the chart (at Run-Time):
Delphi |
---|
var |
Reference•FMX.RS.ChartPanel.TRSCustomChart •FMX.RS.ChartPanel.TRSChartPanel •TRSDBEQChart |