Pagescroller and zoom

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

Pagescroller and zoom

Post by acastro » Tue Jun 24, 2014 1:56 pm

When I add a page scorller to my chart the legend disappears. And if I try to set it to visible with chart editor, it is not possible.

Project to reproduce
http://193.145.251.126/pnp/files/WNvJwc ... leZoom.zip
Press button 1. And then 4 for trying to set legend visible again...

Thanks

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

Re: Pagescroller and zoom

Post by Narcís » Wed Jun 25, 2014 11:10 am

Hi wakeup,

This is by design as ScrollPager tool sets the parent chart layout to a use custom ChartRect so both charts can be aligned properly. The solutions I can think of are:

1. Adding an ExtraLegend tool, for example:

Code: Select all

    public Form1()
    {
      InitializeComponent();
      InitializeChart();
    }

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

      tChart1.Click += tChart1_Click;
    }

    void tChart1_Click(object sender, EventArgs e)
    {
      if (tChart1.Tools.Count == 0)
      {
        Steema.TeeChart.Tools.ScrollPager scrollPager1 = new Steema.TeeChart.Tools.ScrollPager(tChart1.Chart);
        scrollPager1.Series = tChart1[0];

        Steema.TeeChart.Tools.ExtraLegend extraLegend1 = new Steema.TeeChart.Tools.ExtraLegend(tChart1.Chart);
        extraLegend1.Series = tChart1[0];
      }
    }
2. Drawing a custom legend as in the example Christopher Ireland posted here.
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