runtime TOrgseries and scroll and zoom
runtime TOrgseries and scroll and zoom
Hi ,
id work with VCL v8.04 and D2007
try to use the series TOrgSeries without success for now.
In a simple example (in PJ)
I create a chart with series TOrgSeries in IDE
I associate it TScroolbar tools
Then the code, I create multiple Node.
Q1) why the scroll and zoom does not work with the mouse on the mouse, because the nodes are well above the form??
Q2) how the mouse event for retreive the good node?
Q3) why this representation (which is very good for organizations) is not included in the Teetree rather than in the chart?
//== my code for example
procedure TForm1.BtCreateClick(Sender: TObject);
var i,j,n,x:integer;
Org:TOrgSeries;
Item,SubItem:TOrgItem;
begin
if not (chart2.Series[0] is TOrgSeries) then exit;
Org:= (chart2.Series[0] as TOrgSeries);
Org.VertAxis := aLeftAxis ;
Org.HorizAxis := aBottomAxis ;
Org.OnMouseEnter := ChartOnMouseEnter;
// Add cascade Node for exemple
for I := 0 to 20 do begin
n:=Org.Add(-1,'Node'+ inttostr(i),clLime) ;
for j := 0 to 5 do
n:= Org.Add(n,'SubNode'+ inttostr(j),clred) ;
for x := 0 to 5 do
Org.Add(n,'SubNode'+ inttostr(x),clBlue) ;
end; //for i
Org.RecalcOptions:= [ rOnInsert ]; // rOnDelete, rOnModify,rOnClear
chart2.Refresh; // test , but no result !!
ChartScrollBar1.RecalcPosition; // test , but no result !!
end;
id work with VCL v8.04 and D2007
try to use the series TOrgSeries without success for now.
In a simple example (in PJ)
I create a chart with series TOrgSeries in IDE
I associate it TScroolbar tools
Then the code, I create multiple Node.
Q1) why the scroll and zoom does not work with the mouse on the mouse, because the nodes are well above the form??
Q2) how the mouse event for retreive the good node?
Q3) why this representation (which is very good for organizations) is not included in the Teetree rather than in the chart?
//== my code for example
procedure TForm1.BtCreateClick(Sender: TObject);
var i,j,n,x:integer;
Org:TOrgSeries;
Item,SubItem:TOrgItem;
begin
if not (chart2.Series[0] is TOrgSeries) then exit;
Org:= (chart2.Series[0] as TOrgSeries);
Org.VertAxis := aLeftAxis ;
Org.HorizAxis := aBottomAxis ;
Org.OnMouseEnter := ChartOnMouseEnter;
// Add cascade Node for exemple
for I := 0 to 20 do begin
n:=Org.Add(-1,'Node'+ inttostr(i),clLime) ;
for j := 0 to 5 do
n:= Org.Add(n,'SubNode'+ inttostr(j),clred) ;
for x := 0 to 5 do
Org.Add(n,'SubNode'+ inttostr(x),clBlue) ;
end; //for i
Org.RecalcOptions:= [ rOnInsert ]; // rOnDelete, rOnModify,rOnClear
chart2.Refresh; // test , but no result !!
ChartScrollBar1.RecalcPosition; // test , but no result !!
end;
- Attachments
-
- ProjetOrgSerie.zip
- project simple Torgseries
- (8.1 KiB) Downloaded 879 times
Re: runtime TOrgseries and scroll and zoom
Hi
nobody uses this mode of representation (Organization) in chart ???
no suggest ?
nobody uses this mode of representation (Organization) in chart ???
no suggest ?
Re: runtime TOrgseries and scroll and zoom
Hi mivchart,
for this one:
And when I run your application, if I click on "BtCreate" button (to assign the event) and then I click on "Random" button, I see the correct text in the label when I move the mouse around the chart.
I can see the correct texts with your values, with "BtCreate" button.
So I'm not sure to see any problem here. Anyway, another option could be using OnMouseMove event in combination with the Clicked method to retrieve the Index below the mouse pointer.
I'm afraid it's not possible with this series. I've added it to the wish list to be implemented in future releases (TV52015091)mivchart wrote:Q1) why the scroll and zoom does not work with the mouse on the mouse, because the nodes are well above the form??
I've changed this line:mivchart wrote:Q2) how the mouse event for retreive the good node?
Code: Select all
Label1.Caption:= (tmp as TOrgSeries).Items[i].ID;
Code: Select all
Label1.Caption:= (tmp as TOrgSeries).Items[i].Text;
I can see the correct texts with your values, with "BtCreate" button.
So I'm not sure to see any problem here. Anyway, another option could be using OnMouseMove event in combination with the Clicked method to retrieve the Index below the mouse pointer.
Do you mean the automatic positioning of the nodes? With TeeTree you can create an equivalent to a TOrgSeries manually, isn't it?mivchart wrote:Q3) why this representation (which is very good for organizations) is not included in the Teetree rather than in the chart?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: runtime TOrgseries and scroll and zoom
Excuse me for the delay
Thank you for the label, I modified it works.
But the most Pb is the Chart not scroll automatic !!
I do not understand how to use the series Torgseries in this case if the node larger than graph?
Otherwise, with the examples you have teetree to place like a TorgSeries? is important for me.
I have nedd representation larger node.
Thank you for the label, I modified it works.
But the most Pb is the Chart not scroll automatic !!
I do not understand how to use the series Torgseries in this case if the node larger than graph?
Otherwise, with the examples you have teetree to place like a TorgSeries? is important for me.
I have nedd representation larger node.
Re: runtime TOrgseries and scroll and zoom
Hi mivchart,
In the TeeTree2.exe demo application there are many examples of how to create trees, but they won't look like the TOrgSeries.
If you want to have trees with the appearance of the TOrgSeries it should be possible to do it manually. You should create TTreeNodeShape and connect fathers and childs with TTreeConnection. But I'm afraid that calculating the positions of all the Shapes won't be easy (the position depends on the number of shapes in each level and their size).
Here is a start point:
In the TeeTree2.exe demo application there are many examples of how to create trees, but they won't look like the TOrgSeries.
If you want to have trees with the appearance of the TOrgSeries it should be possible to do it manually. You should create TTreeNodeShape and connect fathers and childs with TTreeConnection. But I'm afraid that calculating the positions of all the Shapes won't be easy (the position depends on the number of shapes in each level and their size).
Here is a start point:
Code: Select all
function TForm1.CreateShape(ALeft, ATop, AWidth, AHeight: Integer; AText: String; AParent: TTreeNodeShape): TTreeNodeShape;
begin
result:=TTreeNodeShape.Create(self);
with result do
begin
AutoSize:=False;
X0:=ALeft;
X1:=X0+AWidth;
Y0:=ATop;
Y1:=Y0+AHeight;
Tree1.AddNewShape(result, X0, Y0, AText, nil);
ImageIndex:=tiNone;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var i, separation, tmpwidth, tmpheight: Integer;
Item, SubItem: TTreeNodeShape;
begin
tmpwidth:=50;
tmpheight:=30;
separation:=25;
for i:=0 to 20 do
Item:=CreateShape(10 + i*(separation+tmpwidth), 50, tmpwidth, tmpheight, 'Node'+ inttostr(i), nil);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: runtime TOrgseries and scroll and zoom
hi,
But you do in the TeeChart, why not provide the calculations of TeeChart? I more than to apply it manually in the TeeTree!
I do not see what use this series TorgSeries in the chart if the chart is greater than the window!
But you do in the TeeChart, why not provide the calculations of TeeChart? I more than to apply it manually in the TeeTree!
I do not see what use this series TorgSeries in the chart if the chart is greater than the window!
Re: runtime TOrgseries and scroll and zoom
Hi mivchart,
Excuse me if I haven't expressed clearly enough. We'll try to add the zoom and scroll functionality to the TOrgSeries (TV52015091), but I'm trying to suggest other possibilities to obtain the same result, or similar, in the meanwhile.
Excuse me if I haven't expressed clearly enough. We'll try to add the zoom and scroll functionality to the TOrgSeries (TV52015091), but I'm trying to suggest other possibilities to obtain the same result, or similar, in the meanwhile.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: runtime TOrgseries and scroll and zoom
Ok, Made me know when you have something for me (without the new functionnality if i understand).
Re: runtime TOrgseries and scroll and zoom
Hi mivchart,
The suggestion is to take the code above and create your Org view with TeeTree.
The suggestion is to take the code above and create your Org view with TeeTree.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |