How to display last point.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

How to display last point.

Post by WD_Gordon » Tue Aug 05, 2008 2:37 pm

I am a candle chart and I am loading 1000 candles in to it. I set the MaxPointsPerPage to 50. When the chart is displayed the first time I want to show the user a full 50 candles with the last candle visible. In other words, I want to go to the end of of candles which is the most current date.

What is the best way of doing this? I tried using Scroll but I have to jump through some hoops to get there and it always sets the tChart1.Axes.Bottom.Automatic property to false. which may be normal behavior.

Thanks,
Kevin

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Re: How to display last point.

Post by Christopher » Wed Aug 06, 2008 5:39 am

Hello Kevin,
WD_Gordon wrote:I am a candle chart and I am loading 1000 candles in to it. I set the MaxPointsPerPage to 50. When the chart is displayed the first time I want to show the user a full 50 candles with the last candle visible. In other words, I want to go to the end of of candles which is the most current date.

What is the best way of doing this? I tried using Scroll but I have to jump through some hoops to get there and it always sets the tChart1.Axes.Bottom.Automatic property to false. which may be normal behavior.
Probably the best way is to do something similar to the following:

Code: Select all

    private Steema.TeeChart.Styles.Candle series;

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      tChart1.Series.Add(series = new Candle());
      series.FillSampleValues(1000);

      tChart1.Page.MaxPointsPerPage = 50;
      tChart1.Page.Current = tChart1.Page.Count - 1;
    }
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply