Q46803: Presentation Graphics Allows Only One Color Per Data Series
Article: Q46803
Product(s): See article
Version(s): 2.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 17-JUL-1989
Question:
Can the colors of individual bars (or columns) on a single-series bar
(or column) chart be changed?
Response:
No; the only way to change colors is to change the color for the
entire series, and therefore for all of the bars (or columns). This is
done by modifying the "paletteentry" structure, which is assigned to
the series. The paletteentry structure is defined as follows:
typedef struct
{
unsigned short color;
unsigned short style;
fillmap fill;
char plotchar;
} paletteentry;
An array of paletteentry types is predefined as
typedef paletteentry palettetype[_PG_PALETTELEN];
where _PG_PALETTELEN is the number of series defined.
When using a single-series chart, only palettetype[0] is defined,
giving you the ability to assign one color, one style, one fillmask,
and one plot character to the series. This is by design and
cannot be changed.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.