Hi,
We are currently using Tee-Chart Active X 7.0. We are facing a problem related to Color Grid series. We have plotted the data through the Color Grid series. When we open the T-Chart editor and select the Grid 3D tab, three tabs i.e. “Single” tab or “Range” tab or “Palette” tab appear.
Here when we change the colors either through the “Single” tab or “Range” tab or “Palette” tab, the grid plotted do not update with the color changes. But if I go to “Single” tab and click on button “Remove custom colors”, the white portions of the color grid also gets colored and now all the color changes done either through the “Single” tab or “Range” tab or “Palette” tab do affect the color grid plotted on T-Chart.
I wanted to handle the “Remove custom colors” option at code level, but was not able to find the same. Please suggest.
Also, when we change the Range or Palette style, the legend gets updated
I want to get the list of all the colors, which gets updated on the legend, when I change the Range or Palette style. I was trying the same with the following code, but it retrieved wrong colors.
long LegendItems = m_Chart.Series(colorgridseriesindex).CountLegendItems();
for(int i=0;i<LegendItems;i++)
{
unsigned long color = m_Chart.Series(colorgridseriesindex). LegendItemColor(i);
}
Please suggest if there is any way to directly access the updated colors.
Regards,
Hardeep
Queries for color grid series
Re: Queries for color grid series
Hello,
As you'll see in the image below, I've drawn the rectangles with the symbol colors, next to the symbols.
This button is actually looping the array of colors and setting clTeeColor to all the points. Something like this:amol wrote:I wanted to handle the “Remove custom colors” option at code level, but was not able to find the same. Please suggest.
Code: Select all
With TChart1.Series(0)
For t = 0 To Count - 1
.PointColor(i) = clTeeColor
Next t
End With
You can use the TChart1.Legend.LastValue as last index for the legend items. Here it is an example:amol wrote:I want to get the list of all the colors, which gets updated on the legend, when I change the Range or Palette style. I was trying the same with the following code, but it retrieved wrong colors.
long LegendItems = m_Chart.Series(colorgridseriesindex).CountLegendItems();
for(int i=0;i<LegendItems;i++)
{
unsigned long color = m_Chart.Series(colorgridseriesindex). LegendItemColor(i);
}
Please suggest if there is any way to directly access the updated colors.
Code: Select all
Private Sub Form_Load()
TChart1.Aspect.View3D = False
TChart1.AddSeries scColorGrid
TChart1.Series(0).FillSampleValues
End Sub
Private Sub TChart1_OnAfterDraw()
Dim tmpTop, tmpLeft As Integer
tmpTop = TChart1.Legend.Top + 5
tmpLeft = TChart1.Legend.Left - 12
Dim i As Integer
For i = 0 To TChart1.Legend.LastValue
With TChart1.Canvas
.Brush.Style = bsSolid
.Brush.Color = TChart1.Series(0).LegendItemColor(i)
.Rectangle tmpLeft, tmpTop + (i * 13), tmpLeft + 10, tmpTop + (i * 13) + 7
End With
Next i
End Sub
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Queries for color grid series
Hi Yeray,
Thanks for your guidance. It helped me a lot. There is one more query related to color grid series itself.
When I open the T-Chart editor and select the "Grid3D" tab, and in that I select "Range" tab, I find a button named as "Gallery". In this option there are various combinations of color sequences under "Default" tab like "Ace", "Business", and "Caribe Sun" and so on.
I wanted to find a way to either set or get the options under Gallery button at code level, but was not able to find the same.
Please suggest.
Regards,
Hardeep
Thanks for your guidance. It helped me a lot. There is one more query related to color grid series itself.
When I open the T-Chart editor and select the "Grid3D" tab, and in that I select "Range" tab, I find a button named as "Gallery". In this option there are various combinations of color sequences under "Default" tab like "Ace", "Business", and "Caribe Sun" and so on.
I wanted to find a way to either set or get the options under Gallery button at code level, but was not able to find the same.
Please suggest.
Regards,
Hardeep
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Queries for color grid series
Hi Hardeep,
There's an example of this at the features demo, at All Features\Welcome!\Chart Styles\Surface\Surface Rainbow.
There's an example of this at the features demo, at All Features\Welcome!\Chart Styles\Surface\Surface Rainbow.
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 |