Page 1 of 1

Logarithmic TcolorGridSeries graphics

Posted: Fri Jan 13, 2006 8:55 am
by 8438229
I want to draw a TcolorGridSeries in logarithmic way because I want to show in the graphic big changes of color for small numbers and for big numbers fading slowly. The point is that I have to write in the legend the original numbers and non the logarithmic ones. So I don’t know how to do it.

Moreover, I’d like to know the resolution of the step used in TcolorGridSeries using the Palette mode.

Thanks in advance,

Elisabet

Posted: Mon Jan 16, 2006 9:15 am
by Pep
Hi Elisabet,
and for big numbers fading slowly. The point is that I have to write in the legend the original numbers and non the logarithmic ones. So I don’t know how to do it.
I think the only way around this will be to manually draw custom values for legend by using TChart OnGetLegendXXX events. There is an example of this available in TeeChart Pro v7 Demo Features project
("All Features -> Welcome ! -> Miscellaneous -> Legend->Drawing more text").
Moreover, I’d like to know the resolution of the step used in TcolorGridSeries using the Palette mode.
I'm not sure what you refer here, could you please be more specific ?

Posted: Mon Jan 16, 2006 11:42 am
by 8438229
I've seen that with the option shown, I can write in the legend.

Chart1->Canvas-> TextOut(R.Left+8,R.Bottom-28,"Additional text");
Chart1->Canvas->TextOut(R.Left+8,R.Bottom-16,"displayed here.");

But could I write sereveral lines with one color and the respective number?

Thank you again,

Elisabet

Posted: Mon Jan 16, 2006 3:40 pm
by narcis
Hi Elisabet,
But could I write sereveral lines with one color and the respective number?
I don't understand what you mean. Could you please be more specific or send us an image to help us understand what you want to achieve?

You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Thanks in advance.

Posted: Mon Jan 16, 2006 5:32 pm
by 8438229
I want to write the legend myself. I mean. I want to write a color with the correspondent value. For example, I could write a little square colored by red and close to it the number 5. In other row, another color with diferent number and so on.

In other hand. I have a TBarSeries and in the legend must be shown the color of the bar with their data. What i do is the following:
Series2->Add(5, data5, Series1->Palette[4].Color);
Series2->Add(6, data6, Series1->Palette[5].Color);
Series2->Add(7, data6, Series1->Palette[6].Color);
Series2->Add(8, data7, Series1->Palette[7].Color);

But in this case, the numbers 5-6-7-8 are shown and I just want the data to be visible in the legend. How could i do it?

Thanks in advance. Let me know if you don't understand me.

Posted: Fri Jan 20, 2006 12:22 pm
by Pep
Hi Elisabet,

in that case, if you want to show just the text entered as a labels for the Series you'll have to set the legendtextstyle to "plain" as :
Chart1.Legend.TextStyle:=ltsPlain;

On the other hand, in case you want to change all the text that appears next to the legend symbols you'll have to use the OnGetLegendTextEvent, as :

Code: Select all

procedure TForm1.Chart1GetLegendText(Sender: TCustomAxisPanel;
  LegendStyle: TLegendStyle; Index: Integer; var LegendText: String);
begin
LegendText:= 'my custom text  ' + inttostr(index);
end;