I am using TeeChart pro V8.0.0.6 Version v Active x, C++.
I am trying to use 3D Surface Series with my own pallets. as described in the code bellow.
The problem is that the surface colors are correct in the plot, but the legend shows the correct values(1,11,21,31) as defined in the calls to AddPalette(...) but he colors are different that the ones in the calls to AddPalette(...). It seems to be that the legend is using another palette for the chart.
1. Why do I get the wrong colors?
2. Is there a full example of using SurfaceSeries in C++ Active X?
Thanks;
YVB
Code: Select all
m_Chart.Series(m_lSeriesId).GetAsSurface().ClearPalette();
m_Chart.Series(m_lSeriesId).GetAsSurface().AddPalette(1, RGB(0, 00, 0));
m_Chart.Series(m_lSeriesId).GetAsSurface().AddPalette(11, RGB(255, 0, 0));
m_Chart.Series(m_lSeriesId).GetAsSurface().AddPalette(21, RGB(0, 255, 0));
m_Chart.Series(m_lSeriesId).GetAsSurface().AddPalette(31, RGB(0, 0, 255));
m_Chart.Series(m_lSeriesId).GetAsSurface().AddXYZ(1, 0, 2,"",m_Chart.Series(m_lSeriesId).GetAsSurface().GetSurfacePaletteColor(0));
m_Chart.Series(m_lSeriesId).GetAsSurface().AddXYZ(2, 10, 3,"",m_Chart.Series(m_lSeriesId).GetAsSurface().GetSurfacePaletteColor(10));
m_Chart.Series(m_lSeriesId).GetAsSurface().AddXYZ(3, 20, 4,"",m_Chart.Series(m_lSeriesId).GetAsSurface().GetSurfacePaletteColor(20));
m_Chart.Series(m_lSeriesId).GetAsSurface().AddXYZ(4, 30, 5,"",m_Chart.Series(m_lSeriesId).GetAsSurface().GetSurfacePaletteColor(30));
m_Chart.Series(m_lSeriesId).GetAsSurface().SetUsePalette(true);
m_Chart.GetLegend().GetSymbol().SetSquared(true);
m_Chart.Repaint();