Library Vcl NextSuite 6 NextGrid6 Reference Classes TNxChartColumn6 OnChartColor

OnChartColor

Event where TPen and TBrush used for drawing chart lines or bars can be set to different values than one set in LinePen and FillBrush properties.

pas
property OnChartColor: TNxChartColorEvent read FOnChartColor write FOnChartColor;

Example

pas
procedure TForm1.NxChartColumn61ChartColor(Sender: TObject; Index: Integer;
  var BorderColor, FillColor: TColor);
begin
  if Data[Index] > 5 then
    FillColor := RGB(68, 114, 196)
  else if Data[Index] < 0 then
    FillColor := RGB(237, 125, 49)
  else FillColor := RGB(165, 165, 165);
  BorderColor := FillColor;
end;

Files

Sign in