Logarithmic TcolorGridSeries graphics

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Elisabet
Newbie
Newbie
Posts: 22
Joined: Fri Nov 15, 2002 12:00 am
Location: Madrid

Logarithmic TcolorGridSeries graphics

Post by Elisabet » Fri Jan 13, 2006 8:55 am

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

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Jan 16, 2006 9:15 am

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 ?

Elisabet
Newbie
Newbie
Posts: 22
Joined: Fri Nov 15, 2002 12:00 am
Location: Madrid

Post by Elisabet » Mon Jan 16, 2006 11:42 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jan 16, 2006 3:40 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Elisabet
Newbie
Newbie
Posts: 22
Joined: Fri Nov 15, 2002 12:00 am
Location: Madrid

Post by Elisabet » Mon Jan 16, 2006 5:32 pm

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.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jan 20, 2006 12:22 pm

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;

Post Reply