Problem with legend of Palette
Posted: Thu Jan 26, 2006 1:44 pm
Hello,
I’ve used the Default Palette of type Pale and the Legend is not the correspondent with the colors used in the draw. The first orange color (Series1->Palette[0].Color) is duplicated in the legend and the last color (Series1->Palette[maxIndex].Color) is not shown in the legend. I want to assign the correct colors by the function:
void __fastcall TFormWorldMapLogarithmic::Chart1GetLegendText(
TCustomAxisPanel *Sender, TLegendStyle LegendStyle, int Index,
AnsiString &LegendText)
{
Series1->LegendItemColor(Index) = Series1->Palette[Index].Color;
}
But I have a error while I compile it.
What could I do?
Thanks in advance,
Elisabet
I’ve used the Default Palette of type Pale and the Legend is not the correspondent with the colors used in the draw. The first orange color (Series1->Palette[0].Color) is duplicated in the legend and the last color (Series1->Palette[maxIndex].Color) is not shown in the legend. I want to assign the correct colors by the function:
void __fastcall TFormWorldMapLogarithmic::Chart1GetLegendText(
TCustomAxisPanel *Sender, TLegendStyle LegendStyle, int Index,
AnsiString &LegendText)
{
Series1->LegendItemColor(Index) = Series1->Palette[Index].Color;
}
But I have a error while I compile it.
What could I do?
Thanks in advance,
Elisabet