Stacking Charts
Stacking Charts
Is it possible to stack multiple charts (series) each with a different axis? (e.g. the Financial demo shown on the web site). I need to display more than two (up to 10 or more) lines on a single horizontal axis. Not even sure if "stacked" is the correct term. Do I create a custom axis?
Thanks
Paul
Thanks
Paul
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Paul,
I don't understand exactly what you mean but there are several possibilities:
1. Using custom vertical axes, associating each series vertical axis to the desired one and position each axes wherever you want in the chart. An example of this would be at TeeChart features demo: "All Features\ Welcome!\ Axes\ Scrolling multiple". You can also find a tutorial on how to use custom axes at TeeCharts documentation folder.
2. Stack series as shown at features demo: "All Features\ Welcome!\ Chart Styles\ Standard\ Line (Strip)\ Stack and Overlap".
I don't understand exactly what you mean but there are several possibilities:
1. Using custom vertical axes, associating each series vertical axis to the desired one and position each axes wherever you want in the chart. An example of this would be at TeeChart features demo: "All Features\ Welcome!\ Axes\ Scrolling multiple". You can also find a tutorial on how to use custom axes at TeeCharts documentation folder.
2. Stack series as shown at features demo: "All Features\ Welcome!\ Chart Styles\ Standard\ Line (Strip)\ Stack and Overlap".
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
It sounds like example #2 might do it ... however, I'm at a loss as where to find the demos you're referring to (I'm new to this forum). Are these paths located on the Steema Website, or in the Teechart installation directory? I've searched both places and have not found anything that looks like "All features\Welcome ..."
Thanks
Paul
Thanks
Paul
Ok, disregard my previous post - I found the examples. However, I have a follow up question. If I set a custom vertical axis for the top 33%, the middle 33%, and the bottom 33% of the chart. Is there a way to place a solid horizontal line the border between the three sections? (that would be two lines)
Thanks again
Paul
Thanks again
Paul
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Paul,
Yes, you can use a ColorLine Tool. You will find examples at the TeeChart features demo under All Features\ Welcome!\ Tools\ Color Line.
Yes, you can use a ColorLine Tool. You will find examples at the TeeChart features demo under All Features\ Welcome!\ Tools\ Color Line.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Paul,
You can do it using:
Also don't forget to include TeeTools unit to the uses section.
You can do it using:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
MyLine: TColorLineTool;
begin
Series1.FillSampleValues();
MyLine:=TColorLineTool.Create(Chart1);
with MyLine do
begin
AllowDrag:=False;
Pen.Color:=clRed;
Axis:=Chart1.Axes.Left;
Style:=clMaximum;
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Still not getting the lines to appear, and I believe it's related to the axis. At run time, I'm creating up to 10 custom axis, and it's one of these axis I need to assign the ColorLine to. I can do it in the Editor, but at run time, no lines. Example:
var
LeftAxes : array [1..10] of TChartAxis;
BorderLine : TColorLineTool;
begin
LeftAxes[1] := TChartAxis.Create (Chart.CustomAxes);
BorderLine := TColorLineTool.Create (Chart);
BorderLine.Axis := LeftAxes[1];
end;
Is this correct? If so, it's not working. Or maybe it's something else entirely?
Thanks
Paul
var
LeftAxes : array [1..10] of TChartAxis;
BorderLine : TColorLineTool;
begin
LeftAxes[1] := TChartAxis.Create (Chart.CustomAxes);
BorderLine := TColorLineTool.Create (Chart);
BorderLine.Axis := LeftAxes[1];
end;
Is this correct? If so, it's not working. Or maybe it's something else entirely?
Thanks
Paul
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Paul,
It is redundant that you create LeftAxes array as TeeChart already has a custom axes array Chart1.CustomAxes.Items. The snippet below shows you the appropiate way to get what you request.
It is redundant that you create LeftAxes array as TeeChart already has a custom axes array Chart1.CustomAxes.Items. The snippet below shows you the appropiate way to get what you request.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
Var MyAxis : TChartAxis ;
begin
Series1.FillSampleValues();
MyAxis := TChartAxis.Create( Chart1 );
Series1.CustomVertAxis := MyAxis;
ChartTool1.Axis:=Chart1.CustomAxes.Items[0];
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
I still cannot get the color line to appear. The line appears via the Chart Editor, but I need to create everything at run time. Below is a sample project. The axis and series display fine, but no color line I'm also having the same problem with the cursor tools. What am I missing?
Thanks
Paul
Thanks
Paul
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
TeeTools, Series, ExtCtrls, TeeProcs, TeEngine, Chart;
type
TForm1 = class(TForm)
Chart1: TChart;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
MyAxis : TChartAxis;
Series : TFastLineSeries;
BorderLine : TColorLineTool;
begin
Series := TFastLineSeries.Create(Self);
Series.ParentChart := Chart1;
Series.FillSampleValues;
MyAxis := TChartAxis.Create (Chart1);
Series.CustomVertAxis := MyAxis;
BorderLine := TColorLineTool.Create(Chart1);
BorderLine.Axis := Chart1.CustomAxes.Items[0];
end;
end.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Paul,
This is because you need to set a style or value for the tool as shown here:
This is because you need to set a style or value for the tool as shown here:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
MyAxis : TChartAxis;
Series : TFastLineSeries;
BorderLine : TColorLineTool;
begin
Series := TFastLineSeries.Create(Self);
Series.ParentChart := Chart1;
Series.FillSampleValues;
MyAxis := TChartAxis.Create (Chart1);
Series.CustomVertAxis := MyAxis;
BorderLine:=TColorLineTool.Create(Chart1);
BorderLine.Axis := Chart1.CustomAxes.Items[0];
BorderLine.Style:=clMaximum;
//BorderLine.Value:=500;
Chart1.MarginLeft:=5;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |