I have a question on templates. If I create a template for a pie chart with
individual slices colored the way i want them, it seems that only the first
20 colors are saved with the template - meaning that when I load the
template back and add 25 data Items, only 20 (0-19) are colored the way i
specified. When loading the template into the commander and editing it, I
can also only see the 20 colors defined. I think the same goes for other
charts/series. Is there a limit of 20 in the template design? If so, has it
been increased in newer versions?
Best regards,
Bo
V5 Templates
-
- Newbie
- Posts: 8
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Copenhagen
- Contact:
Hi Bo,
using the predefined colors (clTeeColor) gives you a selection of 20 different colours. If you need more colours than this then you will have to create your own colour palette with an extended number of colours. This could be done in it's most simplest form by creating an array e.g. myTeeColor(i).
using the predefined colors (clTeeColor) gives you a selection of 20 different colours. If you need more colours than this then you will have to create your own colour palette with an extended number of colours. This could be done in it's most simplest form by creating an array e.g. myTeeColor(i).
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 8
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Copenhagen
- Contact:
V5 Templates
Hi Pep,
Thanks for a fast reply. I dont quite understand how it applies to my problem. I want to save the binary template with more than 20 colors defined. It seems it only retains the first 20. Is this a limit that can't be broken in the V5 template, and if so - is the limit of 20 also in v6 and v7.
Best regards
Bo
Thanks for a fast reply. I dont quite understand how it applies to my problem. I want to save the binary template with more than 20 colors defined. It seems it only retains the first 20. Is this a limit that can't be broken in the V5 template, and if so - is the limit of 20 also in v6 and v7.
Best regards
Bo
Pep wrote:Hi Bo,
using the predefined colors (clTeeColor) gives you a selection of 20 different colours. If you need more colours than this then you will have to create your own colour palette with an extended number of colours. This could be done in it's most simplest form by creating an array e.g. myTeeColor(i).
Hi Bo,
Yes, the same limit applies for all three versions. But this can be solved defining an array of colors and using it. I've been able to do this using the following code (run, export to a tee file and then load it, it retains all the colors) :Thanks for a fast reply. I dont quite understand how it applies to my problem. I want to save the binary template with more than 20 colors defined. It seems it only retains the first 20. Is this a limit that can't be broken in the V5 template, and if so - is the limit of 20 also in v6 and v7.
Code: Select all
Private Sub Form_Load()
Dim myTeeColor(23) As OLE_COLOR
TChart1.AddSeries scPie
For i = 0 To 22
myTeeColor(i) = RGB(6 + (i * 7), 100 + (i * 5), 77 + i * 5)
Next i
For i = 0 To 22
TChart1.Series(0).Add 3, "", myTeeColor(i)
Next i
TeeCommander1.Chart = TChart1
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com