Hide Comments
Hide Comments

Comments (0)

The Brush property, along with the    Pen property, controls how the chart draws to the canvas. By changing the Brush's or Pen's values, you can change the appearance of the chart.

For example, by changing the Brush.Style property, you can change the pattern used to fill areas with a RSCharts|TRSAreaChart or pie slices with the RSCharts|TRSPieChart. Depending on the type of chart, the Brush property also controls the Color of the chart (e.g., for pie charts, setting the Color property or the Brush.Color property is equivalent.

noteNote

Some chart types use Brush and Pen values from the TRSChartValue descendant class itself. In which case, these properties are ignored.

Namespace: FMX.RS.ChartPanel

expandingSyntax

Delphi

public
  property Brush: TBrush read FBrush write SetBrush;
 

Property Value

Type: TBrush

expandingExamples

The following example modifies the appearance of an area chart.

Delphi

var
   i: Integer;
 begin
   // Modify the brush and pen
   RSAreaChart1.Brush.Style := csCross;
   RSAreaChart1.Pen.Width := 2;
   RSAreaChart1.Color := clRed;
   // modify the font for the value's Captions
   RSAreaChart1.Font.Style := [fsBold];
   RSAreaChart1.Options := RSAreaChart1.Options - [coColorEachPoint]; // remove coColorEachPoint so we use the chart's color
   // now let's change every  chart value's caption to its index in the collection of chart values
   for i := FirstIndex to LastIndex do
     RSAreaChart1.Values[i].Caption := IntToStr(i);
 end;
 

expandingSee Also

Comments (0)

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