Page 1 of 1

TScrollPager in XE6

Posted: Fri May 16, 2014 2:35 pm
by 10047857
If I try to add a scrollpager tool to the chart it fails to work. If I do dynamically as in the code in the demo it works.

I don't want to initialise the component in code every time - I would like to do by design in the IDE.

I must be missing something.

This is the code:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.FillSampleValues(1000);

  ScrollPagerTool:=TScrollPagerTool.Create(Self);
  ScrollPagerTool.ParentChart:=Chart1;
  ScrollPagerTool.SubChartTChart.Frame.Visible:=False;
  ScrollPagerTool.ColorBandTool.StartLine.Active:=True;
  ScrollPagerTool.ColorBandTool.EndLine.Active:=True;
  ScrollPagerTool.AddSeries(Chart1[0]);


  LineSeries1.FillSampleValues(1000);
end;
Capture4.png
Capture4.png (59.76 KiB) Viewed 8863 times
Bruce.

Re: TScrollPager in XE6

Posted: Mon May 19, 2014 8:20 am
by yeray
Hi Bruce,

I can't reproduce this at design time with TeeChart v2014.11 in a RAD XE6 Delphi VCL project.
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Re: TScrollPager in XE6

Posted: Mon May 19, 2014 2:34 pm
by 10047857
Yeray

I have zipped the test project and attached it. The chart on the left that I create the ScrollPagerTool dynamically works fine. The on on the right fails to show a graph in the sub-chart.

Should Chart2 show a reference to Chart1 as it does here?
Capture1.png
Capture1.png (53.44 KiB) Viewed 8844 times
I have all sorts of issues when trying to add a scrollpager tool and it has sent back a lot of error to your faults server. Some times this fails and I can't clear an exception without killing XE6 and restarting.

Bruce.

Re: TScrollPager in XE6

Posted: Tue May 20, 2014 9:20 am
by yeray
Hello Bruce,
Metman wrote:I have zipped the test project and attached it. The chart on the left that I create the ScrollPagerTool dynamically works fine. The on on the right fails to show a graph in the sub-chart.
Can't see any zip attached. Can you please try it again?
Metman wrote:Should Chart2 show a reference to Chart1 as it does here?
I see your main chart is called Chart2. When you create a TScrollPagerTool, a TSubChartTool with a TChart is internally created. And the TChart created internally takes the name Chart1, yes, that's normal.
However, since you can access the chart in the TSubChartTool through the TScrollPagerTool, I think we could hide the TSubChartTool from the list of tools.
Metman wrote:I have all sorts of issues when trying to add a scrollpager tool and it has sent back a lot of error to your faults server. Some times this fails and I can't clear an exception without killing XE6 and restarting.
I'm trying to reproduce this here. It would be helpful if you could check the attachment mentioned above so we can reproduce the problems here.

Thanks in advance.

Re: TScrollPager in XE6

Posted: Tue May 20, 2014 11:58 am
by 10047857
Hi Yeray

Hopefully it stays attached this time!

Bruce.

Re: TScrollPager in XE6

Posted: Wed May 21, 2014 8:34 am
by yeray
Hi Bruce,

I think I see what is happening.
In your Chart2, where the TScrollPagerTool has been placed at design time, the series linked to it has 25 values, and note this tool sets its default ColorBand Start and End values according to the values in the series linked at the moment of the linkage is being done. Then, you are setting the series to have 1000 values, but the tool has already been initialized, so it isn't reinitialized again after changing the series values.

When I run your test application, I see the image below. The ColorBand in the right chart (Chart2) is present. It's just that it goes from 8 to 16 in an axis scale from 0 to 1000. So the whole ColorBand is in the left of the chart, where you see an arrow:
2014-05-21_1018.png
2014-05-21_1018.png (73.67 KiB) Viewed 8814 times
You can drag the ColorBand and see how the chart above changes.
2014-05-21_1019.png
2014-05-21_1019.png (79.75 KiB) Viewed 8813 times

Re: TScrollPager in XE6

Posted: Wed May 21, 2014 12:54 pm
by 10047857
Hi Yeray

Yes, I can see whats happening now - thanks a lot for making that clear!

Bruce.