DateTime bottom axis problem
DateTime bottom axis problem
I have a graph of 2 series with the bottom axis as date time. I have the bottom axis as date time format as 'mm/dd hh:mm' with multi line labels set to true. The labels still display on one line. Also, I would like to show all dates one after the other without any big gaps in the graph. For instance, if the first graph date is 3/2009 and the next dates start in 2010 all the latter dates are bunched together at the right side of the graph with a large gap between the dates. I have the bottom axis set to automatic. I have attached a picture of my problem. I have tried to follow the tutorial on Axes but I can't seem to solve these problems. Can you please tell me what simple change I have to make to fix this. Thanks.
- Attachments
-
- Picture of my problem
- graph.jpg (14.23 KiB) Viewed 10663 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: DateTime bottom axis problem
Hi alexiat,
You may need to add a line break in the labels format, for example: 'mm/dd' + #13 + 'hh:mm'
If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
I have a graph of 2 series with the bottom axis as date time. I have the bottom axis as date time format as 'mm/dd hh:mm' with multi line labels set to true. The labels still display on one line.
You may need to add a line break in the labels format, for example: 'mm/dd' + #13 + 'hh:mm'
This could be related to the labels style you set for the bottom axis. Try using different LabelStyle available. You can also try changing Increment.Also, I would like to show all dates one after the other without any big gaps in the graph. For instance, if the first graph date is 3/2009 and the next dates start in 2010 all the latter dates are bunched together at the right side of the graph with a large gap between the dates. I have the bottom axis set to automatic. I have attached a picture of my problem. I have tried to follow the tutorial on Axes but I can't seem to solve these problems. Can you please tell me what simple change I have to make to fix this
If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.
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 |
Instructions - How to post in this forum |
Re: DateTime bottom axis problem
The #13 did the trick on the labels. Attached is a project with the gap problem. I am using Delphi 2007 with Tee Chart 8.04.11395. Thanks.
- Attachments
-
- GraphExample.zip
- Example Project
- (2.57 KiB) Downloaded 665 times
Re: DateTime bottom axis problem
Hi alexiat,
First of all, note that datetimes are, in fact, doubles. In your example, between your first and second points, there are 10 months of distance while, between the second point and the last, there are only 3 months of distance. So, I think it is logical that, in a continuous bottom axis with a regular increment, the axis should reflect this difference in distances.
If you want, for example, to have always the same distance between two consecutive points, you could add the points without XValue (so teechart will give integers to them 0, 1, 2, 3,...) and add the YValue and the label as you are doing.
First of all, note that datetimes are, in fact, doubles. In your example, between your first and second points, there are 10 months of distance while, between the second point and the last, there are only 3 months of distance. So, I think it is logical that, in a continuous bottom axis with a regular increment, the axis should reflect this difference in distances.
If you want, for example, to have always the same distance between two consecutive points, you could add the points without XValue (so teechart will give integers to them 0, 1, 2, 3,...) and add the YValue and the label as you are doing.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: DateTime bottom axis problem
Thank you for your insight and advice. I really appreciate it.
Re: DateTime bottom axis problem
Hi,
I am working on a candle chart to display stock quotes and is stucked on the same problem to have always the same distance between two consecutive points (there shouldn't be distance gaps every time the x-timeline hits weekends or holidays). How to achieve the same "compact display" effect with Candle Series? Thanks.
I am working on a candle chart to display stock quotes and is stucked on the same problem to have always the same distance between two consecutive points (there shouldn't be distance gaps every time the x-timeline hits weekends or holidays). How to achieve the same "compact display" effect with Candle Series? Thanks.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: DateTime bottom axis problem
Hi SSWang,
Yes, this is possible. You should do as in the All Features\Welcome!\Chart Styles\Financial\Candle (OHLC)\Axis Labels no Weekends example in the new features demo, available at TeeChart's program group.
Yes, this is possible. You should do as in the All Features\Welcome!\Chart Styles\Financial\Candle (OHLC)\Axis Labels no Weekends example in the new features demo, available at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |