User (Legacy) Posted November 24, 2000 Report Share Posted November 24, 2000 Hi, I can observe some strange look of the data editor grid when multiple colours chart is used. The colour boxes in the data grid heading are displayed near to point labels. I would expected them displayed near the series labels -- as in the other cases. See the stored chart in the attached zip file. Notice: Some of the "unlogical" colours in the example vere set manually by dragging the color from palette. Here is what I did to display the chart. ================================================================ I have used the multiple colors chart with several series, 20 points, 3D, Z-clustered bars. One of the series has point bars coloured by calculated RGB values. The other serie point bars are assigned the colour from the palette -- the serie index is used to choose the palette color. It is my first experience with the multiple colors chart. Is the following approach correct? 1. I am setting the multiple colors property. m_spChart->PutMultipleColors(TRUE); 2. If I understood well, it is necessary to open data channel with COD_COLORS and pass the number of colors that will be used (i.e. the number of points, bars). The cannel is then closed immediately. m_spChart->OpenDataEx(ChartfxLib::COD_COLORS, nSeries * iNumPoints, 0); m_spChart->CloseData(ChartfxLib::COD_COLORS); 3. I have opended the data channel for the data and filled the values together with setting the bar colour. Then the data channel was closed. m_spChart->OpenDataEx(ChartfxLib::COD_VALUES, nSeries, iNumPoints); ... in the loop for each of series and for each point... { ... set the value of the point... // Set the colour of the point. // int ColorIndex = nSerieIndex + nSeries * iPointIndex; COLORREF Color = RGB(255, 128, 0); // init switch (nSerieIndex) { case 0: m_spChart->PutColor(ColorIndex, ...calculated RGB...); break; default: // The others use the palette color for the serie. Color = ChartfxLib::CHART_PALETTECOLOR | nSerieIndex; m_spChart->PutColor(ColorIndex, Color); } } m_spChart->CloseData(ChartfxLib::COD_VALUES); I am using MSVC++6, WindowsNT, Cfx4032.dll version 4.0.19.0. Thanks for your comments, Petr -- Petr Prikryl, SKIL s.r.o., e-mail: prikrylp at skil dot cz Please, don't reply via e-mail. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.