Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetDefaultColorPalette; // Make sure we start with the default
- ColorPalette[4] := $007FFF; // Change White to Orange
- try
- // add series to the chart
- finally
- SetDefaultColorPalette; // Set it back to Default
- end;
- procedure TForm1.setColors(aChart: TChart; aColorArray: array of TColor);
- var
- chi : Integer;
- coi : Integer;
- begin
- coi := low(aColorArray);
- for chi := 0 to aChart.SeriesList.Count - 1 do begin
- aChart.SeriesList[chi].Color := aColorArray[coi];
- inc(coi);
- if coi > high(aColorArray) then
- coi := low(aColorArray);
- end;
- end;
- procedure TForm1.FormShow(Sender: TObject);
- var
- ca : array of TColor;
- begin
- setLength(ca, 3);
- ca[0] := clRed;
- ca[1] := clBlue;
- ca[2] := clGreen;
- setColors(Chart1, ca);
- end;
Add Comment
Please, Sign In to add comment