Page 1 of 1

Pagescroller and zoom

Posted: Tue Jun 24, 2014 1:56 pm
by 15654539
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

Re: Pagescroller and zoom

Posted: Wed Jun 25, 2014 11:10 am
by narcis
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.