Contains all the bars in the sparse bar chart. Each item ( FMX.RS.BarCharts.TRSSparseBarChartValue ) specifies one bar and its properties, including X, Value, Color, and Caption. Use the Values collection to add, delete, and modify bars in the chart.
Namespace: FMX.RS.BarCharts
Property Value
Type: TRSSparseBarChartValues
The following code sets up a TRSSparseBarChart to display a couple of bars:
Delphi
|
var
Value: TRSSparseBarChartValue; // note, this type should be the same that the chart uses (e.g., TRS2DChartValue, TRSArrowChartValue, etc)
begin
RSSparseBarChart1.BarStyle := bsRoundRect;
RSSparseBarChart1.BarSizePct := 75;
// Add first Bar
Value := RSSparseBarChart1.Values.Add;
Value.X := EncodeDate(2014, 12, 24);
Value.Color := clRed;
Value.Vale := 10.0;
// Add second Bar
Value := RSSparseBarChart1.Values.Add;
Value.X := EncodeDate(2014, 12, 31);
Value.Color := clBlue;
Value.Value := 25.0;
end;
|
|