Please see attached chart. Form of interest is the second form, called "LifeTemp".
With Yeray's help I developed a custom logarithmic display that works on equal ratios rather than equal linear increments. You can see the code in the AfterDraw event. Not sure if this is the best approach. If you see a better method please let me know. I'm not completely satisfied yet. There may need to be additional tics in the left axis. Maybe they will end up being 10, 15, 20, 35, 50, 70, 100, etc.
I realize that the 50 tic is off the chart. It is a bug that I will find and fix.
There are three remaining issues:
1. Please demonstrate the way to draw grid lines that match the TeeChart default grid format, rather than the long dashes of the line property.
2. Could you show me how to move the left axis title away from the custom axis labels, or if necessary, to clear and redraw the title.
3. Please give me a pointer if there is a way to format the axis title and other text to include subscripts and exponents.
Custom Chart Display
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Custom Chart Display
- Attachments
-
- ENW-Test01.zip
- (9.32 KiB) Downloaded 662 times
Re: Custom Chart Display
Hi Hans,
1. Oups, I think I suggested you psDash while default grid lines are drawn in psDot.
2. You could do something as explained here.
3. Take look at the demo at All features\Welcome !\3D Canvas\RichText Drawing
1. Oups, I think I suggested you psDash while default grid lines are drawn in psDot.
2. You could do something as explained here.
3. Take look at the demo at All features\Welcome !\3D Canvas\RichText Drawing
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Re: Custom Chart Display
Thanks Yeray. Actually it was my own decision to use psDash. I took psDot too literally. It is actually a short dash.
Second link in your message does not work.
From first ink in your message, I dded the following two lines, but they make no change in appearance of my left axis:
TitleSize := 0;
LabelsSize := 50;
Complete, updated demo package is attached.
Second link in your message does not work.
From first ink in your message, I dded the following two lines, but they make no change in appearance of my left axis:
TitleSize := 0;
LabelsSize := 50;
Complete, updated demo package is attached.
- Attachments
-
- ENW-Test02.zip
- (14.14 KiB) Downloaded 691 times
Re: Custom Chart Display
Hi Hans,
Yeray wrote:3. Take look at the demo at All features\Welcome !\3D Canvas\RichText Drawing
No, that's not a link. I'm talking about the New Features Demo program that comes with TeeChart installation. You should be able to find it at Steema programs group.Hans Wolfgang wrote:Second link in your message does not work.
You are placing this into OnAfterDraw event. Try it in your FormCreate method.Hans Wolfgang wrote:From first ink in your message, I dded the following two lines, but they make no change in appearance of my left axis:
TitleSize := 0;
LabelsSize := 50;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Re: Custom Chart Display
Thanks that works fine for left axis.
For bottom axis I have the same trouble separating the axis title from custom drawn axis labels. In FormCreate() I have the following:
LeftAxis.TitleSize := 0;
LeftAxis.LabelsSize := 10 + canvas.TextWidth( '2000' );
{ the next two lines do not have the desired effect }
BottomAxis.TitleSize := 0;
BottomAxis.LabelsSize := 10 + canvas.TextHeight( '2' );
Demo package is attached.
For bottom axis I have the same trouble separating the axis title from custom drawn axis labels. In FormCreate() I have the following:
LeftAxis.TitleSize := 0;
LeftAxis.LabelsSize := 10 + canvas.TextWidth( '2000' );
{ the next two lines do not have the desired effect }
BottomAxis.TitleSize := 0;
BottomAxis.LabelsSize := 10 + canvas.TextHeight( '2' );
Demo package is attached.
- Attachments
-
- ENW-Test06.zip
- (29.12 KiB) Downloaded 673 times
Re: Custom Chart Display
Hi Hans,
Note that in the Left axis you've set the labels to be visible and an increment of 200 so that the automatic labels are not drawn but they reserve the space to be drawn and that looks like a margin.
So, to do the same for the bottom axis, you could add the following at you FormCreate:
Note that in the Left axis you've set the labels to be visible and an increment of 200 so that the automatic labels are not drawn but they reserve the space to be drawn and that looks like a margin.
So, to do the same for the bottom axis, you could add the following at you FormCreate:
Code: Select all
chLifeTemp.BottomAxis.Labels := true;
chLifeTemp.BottomAxis.Increment := 200;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 58
- Joined: Fri Nov 15, 2002 12:00 am
- Location: Naples, FL
- Contact:
Re: Custom Chart Display
Perfect, thank you.