Inverting chart / series colors automatically

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MWeingarden
Newbie
Newbie
Posts: 3
Joined: Fri Sep 05, 2014 12:00 am

Inverting chart / series colors automatically

Post by MWeingarden » Wed May 13, 2015 6:57 pm

I am displaying a chart (FastLine Series) in 2 different modes, one that is updated in real time, and one that shows past data. When real time mode is selected, I would like to invert the colors of the Chart, Axes, Titles, Series, automatically. Is there any easy way to do this?

Thank you.
M Weingarden

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Inverting chart / series colors automatically

Post by Yeray » Thu May 14, 2015 9:31 am

Hello Weingarden,

You could use Themes feature for this. You can create two custom themes, one for each mode, and set them when needed.
Take a look at this article on the blog:
http://steema.com/wp/blog/2014/03/17/te ... nd-themes/
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

MWeingarden
Newbie
Newbie
Posts: 3
Joined: Fri Sep 05, 2014 12:00 am

Re: Inverting chart / series colors automatically

Post by MWeingarden » Tue Jun 02, 2015 2:57 pm

The themes certainly will help out. Are there any examples in C++? When I try to compile ApplyChartTheme using one of the TXxxthemes as a parameter, I am getting an error. What is the correct way to call the routine in C++ (Rad Studio XE7)?

Thank you

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Inverting chart / series colors automatically

Post by Narcís » Mon Jun 08, 2015 7:37 am

Hello,

Apologies for the delayed reply here.

You can call ApplyChartTheme in C++ Builder like this:

Code: Select all

  TFlatTheme * flat = new TFlatTheme(Chart1);
  ApplyChartTheme(flat->ClassType(),Chart1);
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply