Getting at series of a TeeChart
I have placed a TeeChart on a report and have used the Edit Chart dialog to
add 5 series to the chart (Series1 thru Series5). This chart is the only
thing on the chart besides some static labels, page #, etc. How do I access
each of the series in my code in order to add data points? I am used to
doing things like:
Series1.Add(....)
However, for some reason, it does not appear that this can be done this way
when the chart is on a report.
Also, when (in what event) should I actually do the population of the chart?
I am assuming that, in this case, I would do it in the BeforePrint event of
the report.
NOTE: I am using Delphi 6 and ReportBuilder 6.03 and I have the full version
of TeeChart Pro 5.02.
add 5 series to the chart (Series1 thru Series5). This chart is the only
thing on the chart besides some static labels, page #, etc. How do I access
each of the series in my code in order to add data points? I am used to
doing things like:
Series1.Add(....)
However, for some reason, it does not appear that this can be done this way
when the chart is on a report.
Also, when (in what event) should I actually do the population of the chart?
I am assuming that, in this case, I would do it in the BeforePrint event of
the report.
NOTE: I am using Delphi 6 and ReportBuilder 6.03 and I have the full version
of TeeChart Pro 5.02.
This discussion has been closed.
Comments
When using a DBChart, how does one assign a datasource to a chart? data to
different series?
is accessible via the TppTeeChart.Chart poperty.
ppTeeChart1.Chart.Series[0]
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
ppDPTeeChart1.Chart.Series[0].DataSource := ppReport1.DataPipeline;
We just create a wrapper around Teechart with out TppDBTeeChart class. Once
you have access to the Chart, you should be able to use the Teechart
reference help on configuring the Chart via code.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
the designer (like one might do if putting a TeeChart on a form). In light
of this, are there any good samples of how to do coding for a stacked bar
chart with like 3 series. Data might look something like the following:
Month1 Large 200
Month1 Medium 100
Month1 Small 100
Month2 Large 300
Month2 Medium 150
Month2 Small 50
.
.
.
Month12 Large 250
Month12 Medium 125
Month12 Small 100
What I really want is as follows:
x 3 bar series: one for Large, one for Medium, and one for Small
x labels on the x-axis indicating the month
x an additional series that is a line graph showing the total of the
other three series
I guess the bottom line of my question is are there any good demos about
doing charts on ReportBuilder reports?
clicking over the chart and choosing Edit Chart from the popup window. You
should then see the entire Teechart editor "dialog" which gives you the
ability to create the chart visually.
We don't have any demos specifically for creating charts in RB. Your best
bet is to contact the TeeChart guys for more information on creating charts
at runtime. The TppTeeChart.Chart property gives you access to the
TCustomChart (the Teechart class) that our RB Teechart wrapper components
'wrap.'
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com