Board index » delphi » To clone a given TDBChart ?

To clone a given TDBChart ?

Witch is the best way to clone a given TDBChart with certain series included
?
 

Re:To clone a given TDBChart ?


What do you mean by clone? Most simply, you can just copy and paste through
the clipboard, but perhaps that's not what you had in mind.

--
Steve F (Team B)

Quote
"genc ymeri" <gym...@qtsrail.com> wrote in message

news:3b051f9d$1_2@dnews...
Quote
> Witch is the best way to clone a given TDBChart with certain series
included
> ?

Re:To clone a given TDBChart ?


I have a chart with several series in the main form. I want to clone this
chart to other open forms without adding & formating the series of the new
charts from the beginning .......

Thnx
PS:
I didn't mean to copy to the clipboard !

"Steve F (Team B)" <sfischk...@home.com> wrote in message
news:3b05b990_2@dnews...

Quote
> What do you mean by clone? Most simply, you can just copy and paste
through
> the clipboard, but perhaps that's not what you had in mind.

> --
> Steve F (Team B)
> "genc ymeri" <gym...@qtsrail.com> wrote in message
> news:3b051f9d$1_2@dnews...
> > Witch is the best way to clone a given TDBChart with certain series
> included
> > ?

Re:To clone a given TDBChart ?


Well, in fact if you have the datasources in a common place such as a main
form or data module, you can just cut and paste the chart. If you don't,
then you'll have to replicate the data sources as well. That's because the
data sources references must not change during the replication.

With regard to replication, this can occur at several levels. For example,
you can copy an image of the TChart. An example of this is when you simply
want to print the chart. In this case, you just create a metafile and use
that. You can also copy the data from one to the other. The full copy,
including properties, is best done through the clipboard (at design time) or
by assigning one TChart to the other (at run time).

--
Steve F (Team B)

Re:To clone a given TDBChart ?


Well, in fact if you have the datasources in a common place such as a main
form or data module, you can just cut and paste the chart. If you don't,
then you'll have to replicate the data sources as well. That's because the
data sources references must not change during the replication.

With regard to replication, this can occur at several levels. For example,
you can copy an image of the TChart. An example of this is when you simply
want to print the chart. In this case, you just create a metafile and use
that. You can also copy the data from one to the other. The full copy,
including properties, is best done through the clipboard (at design time) or
by assigning one TChart to the other (at run time).

--
Steve F (Team B)

Re:To clone a given TDBChart ?


The full copy, including properties, is best done through the clipboard (at
design time) or
by assigning one TChart to the other (at run time).

I tried this even before I post it but I didn't  work. You can copy the
properties (assign them) but you still have to add series...and if you
assign the series they don't show up, ........

e.g
   s := TChartseries.Create(self);
    s.Assign(dbchart1.series[0]);
    s.ParentChart := dbchart2;
    dbchart2.AddSeries(s);
the serie 's'  doesn't show up

if I want just to move the chart or the series  from one form to another
from, or from one chart to another one that's easy, but I just eant to copy
them without doing all the formats manually, witch I did for the first
chart..( it's very complicated one)

Quote
> --
> Steve F (Team B)

Other Threads