Pivot Chart functionality with Tchart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
den
Newbie
Newbie
Posts: 15
Joined: Wed Jan 30, 2008 12:00 am

Pivot Chart functionality with Tchart

Post by den » Thu Feb 07, 2008 12:46 am

Has anyone been able to use Tchart to create similar functionality as PivotChart in MSAccess? Would anyone have any suggestions as how to?

I am trying to summarize data in a stacked bar series with multiple charts using the same data with each chart using a separate group of the data. I want to be able to do something similar to the multichart capability of MSAccess' PivotChart.

Any suggestions would be appreciated.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Feb 12, 2008 6:37 pm

Hi den,

have you take a look at the TDBCrossTabSource component ?
You can find some example of use into the Demo Features projext (included into the TeeChart Pro installation).

den
Newbie
Newbie
Posts: 15
Joined: Wed Jan 30, 2008 12:00 am

Post by den » Fri Apr 04, 2008 6:43 pm

Thanks Pep, but the TDBCrossTabSource component will not work in this case. (The legend and the colours have to be shared across all of the charts and the chart axes have to have the same y min/max values).

For those interested, I have 'developed' a solution to this problem. Be warned, however, that it took a fair amount of coding using a TChart and adding the series data programmatically!

Cheers,

Dennis

tangone
Newbie
Newbie
Posts: 23
Joined: Tue Jun 26, 2007 12:00 am

Re: Pivot Chart functionality with Tchart

Post by tangone » Sun May 27, 2012 10:03 am

Hi den,

I am trying to do the similar task and have been searching for solutions up and down.
Would you be able to show how you have done this?

appreciate it.

rgds,
tangone

den
Newbie
Newbie
Posts: 15
Joined: Wed Jan 30, 2008 12:00 am

Re: Pivot Chart functionality with Tchart

Post by den » Sat Jun 02, 2012 3:32 pm

Tongone:

Sorry for the delay in answering this - so busy it slipped my mind.

In a nutshell, I had to create the repective charts dynamically (in Delphi) on the fly. I then dynamically added TDBCrossTabSources (again dynamically) to each chart and set their appropriate properties. Furthermore, the querys used were specifically written to 'pre-summarized' the data for use by the DBCrossTabSources.

I think you get to see that this was not trivial. If you really desire more detail, please let me know, and I will see what I can do to help.

Cheers,

Dennis

Post Reply