Any idea about SetPointLabel method ?

TeeChart for ActiveX, COM and ASP
Post Reply
David
Newbie
Newbie
Posts: 4
Joined: Mon Feb 26, 2007 12:00 am

Any idea about SetPointLabel method ?

Post by David » Thu May 31, 2007 5:55 am

Hi all...

My project is basically making trading software so I need to remove
weekend data (as also somebody said in this forum) by using SetPointLabel method.
I can now handle all weekend data to be removed using SetPointLabel method.


The first problem was there was always some spaces (gaps) on the left.
After the first drawing, the first label on the left was appeared some spaces away from the left axis.
I worked out this by using the following methods.
//m_Chart.GetAxis().GetBottom().SetAutomatic(TRUE);
m_Chart.GetAxis().GetBottom().SetAutomaticMinimum(TRUE);
//m_Chart.GetAxis().GetBottom().SetAutomaticMaximum(TRUE);


Fortunately, the left spaces (gaps) are now gone but when a chart is being scrolled,
a gap between two adjacent items (candlesticks) is getting bigger or
sometimes smaller, which is another problem and implies the methods
above may not be sufficient for this case.
So it doesn't look good and is not consistent in terms of date range
between two candlestick items.
I guess before the above methods are called, the automatic mode is turned off.
I may have coded that...That's why I first got some spaces on the left.


The main thing left is how to make it look very similar to one as if I
didn't need to use SetPointLabel method to remove weekend data.
It should look very similar to what I got before I didn't use
SetPointLabel method.


Basically, I want two things to be worked out.
1. No additional big space between the left axis and the first label (the first data being displayed)
As I said above, this can be solved by SetPointLabel method.
but another big proglem ocurred.
2. As long as SetPointLabel method is used for removing and handling weekend data,
when a chart is being scrolled horizontally,
a gap between two adjacent items (candlesticks) must not be getting bigger or smaller.


Any help and comment would be great.

Thanks a lot in advance.

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

Post by Narcís » Thu May 31, 2007 8:59 am

Hi David,

To remove weekend data have you tried doing as in the All Features\Welcome!\Chart Styles\Financial\Axis labels no weekends example at the features demo? You'll find the demo 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
Image Image Image Image Image Image
Instructions - How to post in this forum

David
Newbie
Newbie
Posts: 4
Joined: Mon Feb 26, 2007 12:00 am

Could you please add just one more feature to the example ?

Post by David » Thu May 31, 2007 12:35 pm

Thank you for your recommendation.

I've actually referred to the example that you said.
The problem that I have is now simplified.
Could you please add just one more feature to the example ?
What the feature is that a new example should be able to be scrolled horizontally by mouse right button.
The current example shows there is no data and date (being displayed at the bottom axis) between the left axis and the current first label.
If you just scroll the existing chart horizontally, you will recognize how to put new data between them.
It is not deleting all existing data then putting all new data into the existing chart.
New data should be continued from the existing data so it will really look like all connected graphs (like data stream).
So I can continue scrolling a chart from right to left (horizontally, of course).

Once you've worked out (meaning if you show me this new feature added in the existing example that you said),
the problem will be suddenly gone...I am very sure...
Could you please give me one example implemented the new feature ?

Really thank you for your help again.

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

Post by Narcís » Thu May 31, 2007 1:49 pm

Hi David,

Sorry but I don't understand which is your exact problem scrolling horizontally the chart. Could you please give me some more information about your request?

For example, if you zoom a region in the chart and then scroll this region you'll see the series appearing continuously, doesn't it? You could also try setting horizontal axes minimum and maximum properties to some values smaller than your data range, so that when you scroll your chart some data will fall beyond the chart rectangle area and thus displayed when you scroll the chart horizontally.
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

David
Newbie
Newbie
Posts: 4
Joined: Mon Feb 26, 2007 12:00 am

Post by David » Fri Jun 01, 2007 12:08 am

Hi...

As I said before, you can easily reproduce the problem that I have now.
You can add just one additional feature to the example given (that you said).

The current example shows there is no data and date (being displayed at the bottom axis) between the left axis and the current first label,
when you just scroll the existing chart horizontally by mouse right button.
You will need to think about how to put new data between them, which is my problem.

You don't need to think about zooming feature for solving the problem.
Just open the example, "All Features -> Chart Styles -> Financial -> Candle (OHLC) -> Axis Labels no Weekends".
Then scroll the existing chart by mouse right button as mentioned above.
There will be certainly no data and date (being shown) between the left axis and the current first label.
You might want to put some consistent data (connected to the existing data) between them.

Thank you again.

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

Post by Narcís » Fri Jun 01, 2007 8:20 am

Hi David,

This happens because that series has not more data that what's displayed. That's why I suggested you to use SetMinMax method to change bottom axis minimum and maximum properties to choose which range of data will be displayed. If the range is smaller to the whole series data, when scrolling the chart you'll see that series are continuous.

Another option would be getting series' XValues.Minimum property and use AddXY method to add x values smaller to that property.
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

Post Reply