Hi
We have a pie that is based on a clientdataset
we want to give it our own colors but couldn't find a way to do that, it seems to have a fixed number of themes to be used but not a manual one
please advice
Thanks
cusom colors for pie
Re: cusom colors for pie
Hi Nati,
You can assign a color manually to the series' ValueColor array.
Alternatively, you could use ColorSource property to use the colors from the datasource as explained here
You can assign a color manually to the series' ValueColor array.
Alternatively, you could use ColorSource property to use the colors from the datasource as explained here
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: cusom colors for pie
Hi Nati,
You can provide colors either using VCL TColor values, for example: clRed, clGreen, clWhite, etc.; or using RGB(r,g,b) method.
You can provide colors either using VCL TColor values, for example: clRed, clGreen, clWhite, etc.; or using RGB(r,g,b) method.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: cusom colors for pie
Hi
I have a set of several colors and I don't know how many colors I will need in pie so instead of looping and guessing, can't I just set a palette and let it use it automatically?
I have a set of several colors and I don't know how many colors I will need in pie so instead of looping and guessing, can't I just set a palette and let it use it automatically?
Re: cusom colors for pie
I'm doing the following, just to check:
for i := 0 to DBChart1.Series[0].ValuesList.Count - 1 do
DBChart1.Series[0].ValueColor := $00FE9B82;
and even though DBChart1.Series[0].ValuesList.Count returns 2
I get list index out of bounds(1) error for DBChart1.Series[0].ValueColor (when i equals 1)
If there is a way to set this palette in design time it will help a lot
Thanks
for i := 0 to DBChart1.Series[0].ValuesList.Count - 1 do
DBChart1.Series[0].ValueColor := $00FE9B82;
and even though DBChart1.Series[0].ValuesList.Count returns 2
I get list index out of bounds(1) error for DBChart1.Series[0].ValueColor (when i equals 1)
If there is a way to set this palette in design time it will help a lot
Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: cusom colors for pie
Hi Nati,
Series' ValueLists are the structure where series' values are stored so usually series have those ValueLists: XValues, YValues, ValueColor and LabelText. Some series have more ValueLists. Each ValueList store correpsonding values. For your purpose you should not loop according to ValueList.Count, this will give you the number of ValueLists, not the number of points in a series. You should loop ValueColor.Count or Series.Count instead.
If the problem persist please attach a simple example project we can run "as-is" to reproduce the problem here.
No, there's no design-time support for that.
Yes, you can create your own custom color palettes as explained in the All Features\Welcome!\Aspect\Custom palettes example at the new features demo available at TeeChart's program group.I have a set of several colors and I don't know how many colors I will need in pie so instead of looping and guessing, can't I just set a palette and let it use it automatically?
I'm doing the following, just to check:
for i := 0 to DBChart1.Series[0].ValuesList.Count - 1 do
DBChart1.Series[0].ValueColor := $00FE9B82;
and even though DBChart1.Series[0].ValuesList.Count returns 2
I get list index out of bounds(1) error for DBChart1.Series[0].ValueColor (when i equals 1)
Series' ValueLists are the structure where series' values are stored so usually series have those ValueLists: XValues, YValues, ValueColor and LabelText. Some series have more ValueLists. Each ValueList store correpsonding values. For your purpose you should not loop according to ValueList.Count, this will give you the number of ValueLists, not the number of points in a series. You should loop ValueColor.Count or Series.Count instead.
If the problem persist please attach a simple example project we can run "as-is" to reproduce the problem here.
If there is a way to set this palette in design time it will help a lot
No, there's no design-time support for that.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |