Print Page | Close Window

AdvGDIPChartView Colors

Printed From: TMS Software
Category: VCL Components
Forum Name: VCL Chart
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=13961
Printed Date: 12 Dec 2019 at 1:22am


Topic: AdvGDIPChartView Colors
Posted By: Keene Douglas
Subject: AdvGDIPChartView Colors
Date Posted: 22 Sep 2019 at 1:44pm
Hello
I am able to make the background gradient on a AdvGDIPChartView at design time, but in runtime, i try the following code to set up the AdvGDIPChartView:

   Self.AdvGDIPChartView1.Panes.Clear;
   Self.AdvGDIPChartView1.Panes.Add;
   Self.AdvGDIPChartView1.BeginUpdate;
   for MyCount := 0 to GNumberOfDevices-1 do  //here, i add a series for each device
   begin
      Self.AdvGDIPChartView1.Panes[0].Series.Add;
      Self.AdvGDIPChartView1.Panes[0].Series[MyCount].ChartType:=ctXYLine;
   end;
   Self.AdvGDIPChartView1.Panes[0].XAxis.UnitType:=utMinute;
   Self.AdvGDIPChartView1.Panes[0].Range.StartDate:=Now;

   Self.AdvGDIPChartView1.Panes[0].Series[0].Opacity:=95;
   Self.AdvGDIPChartView1.Panes[0].Series[0].Color:=clTeal;
   Self.AdvGDIPChartView1.Panes[0].Series[0].ColorTo:=clOlive;
   Self.AdvGDIPChartView1.Panes[0].Series[0].GradientType:=gtHorizontal;
   Self.AdvGDIPChartView1.Panes[0].Series[0].GradientDirection:=cgdHorizontal;
   Self.AdvGDIPChartView1.Panes[0].Series[0].Angle:=45;
   Self.AdvGDIPChartView1.Panes[0].Series[0].HatchStyle:=HatchStyleVertical;
   Self.AdvGDIPChartView1.EndUpdate;


yet the background remains white. Any suggestions?
Thanks
Doug



Replies:
Posted By: Pieter Scheldeman
Date Posted: 23 Sep 2019 at 3:36pm
You can change the background of the chart with Self.AdvGDIPChartView1.Panes[0].Background.


Posted By: Keene Douglas
Date Posted: 23 Sep 2019 at 9:22pm
Thanks! I was going by the documentation.



Print Page | Close Window