TScrollPager in XE6

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Metman
Advanced
Posts: 113
Joined: Fri Dec 21, 2007 12:00 am

TScrollPager in XE6

Post by Metman » Fri May 16, 2014 2:35 pm

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 8862 times
Bruce.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TScrollPager in XE6

Post by Yeray » Mon May 19, 2014 8:20 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Metman
Advanced
Posts: 113
Joined: Fri Dec 21, 2007 12:00 am

Re: TScrollPager in XE6

Post by Metman » Mon May 19, 2014 2:34 pm

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 8843 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.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TScrollPager in XE6

Post by Yeray » Tue May 20, 2014 9:20 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Metman
Advanced
Posts: 113
Joined: Fri Dec 21, 2007 12:00 am

Re: TScrollPager in XE6

Post by Metman » Tue May 20, 2014 11:58 am

Hi Yeray

Hopefully it stays attached this time!

Bruce.
Attachments
Test Project.zip
(75.22 KiB) Downloaded 578 times

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TScrollPager in XE6

Post by Yeray » Wed May 21, 2014 8:34 am

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 8813 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 8812 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Metman
Advanced
Posts: 113
Joined: Fri Dec 21, 2007 12:00 am

Re: TScrollPager in XE6

Post by Metman » Wed May 21, 2014 12:54 pm

Hi Yeray

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

Bruce.

Post Reply