Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Histogram: How to group bars?

Status
Not open for further replies.

kaeserea

Programmer
Feb 26, 2003
164
DE
Hi!

For my histogram I use two ACROSS sorts. To make it clearer for the user I'd like to group the bars. E.g.
[tt]
SUM SALES
ACROSS CAR_MODEL
ACROSS WEEKDAY
[/tt]
Assume we have 4 car models. We have 5 week days which are relevant for sales. So what I'd like to get is
[tt]
^
| | |
| | || | |
| | | | |||| | |
| || || | | ||||| |||
| ||||| || || ||||| |||||
| ||||| ||||| ||||| |||||
|-------------------------------------->
Toyota VW Benz BMW
[/tt]
What the histogram displays is a grouping by each model the company sells and further grouping for the weekdays.

Can anybody tell me how to achieve this?

Thanx
Eva
 
Eva,

It does not seem to be trivial.
I suggest you, to put in on the 'focus-l' list as well.

Grzegorz
 
Eva,

Below you can find the example of the "grouped-bar histogram".
It contains the same information, also displayed in the readable and meaningful way, and it is much more simple to create. The only difference is that it displays data vertically:

DEFINE FILE GGSALES
DW/A4= DOWK(DATE, DW);
END
-*
TABLE FILE GGSALES
SUM DOLLARS
BY REGION
BY DW
ROWS 'SUN' OVER 'MON' OVER 'TUE' OVER 'WED' OVER 'THU'
OVER 'FRI' OVER 'SAT'
ON REGION SUBFOOT
" "
ON TABLE SET STYLE *

-* Parameters of the histogram bars:
GRAPHTYPE=DATA, COLUMN=DOLLARS, GRAPHCOLOR=MAROON, GRAPHLENGTH=5,$

-* The break between groups:
TYPE=SUBFOOT, BACKCOLOR=SILVER,$

END

Hope this helps
Grzegorz

P.S.
It is still interesting how to create the horizontal version of the grouped-bar histogram (if it is possible, of course).
 
Hello Grzegorz,

Your solution produces several graphics which include one bar each. How can I put all these graphics into one?

Regards
Eva
 
Eva,

If I understand your question correctly, you would like to have all of the report content in one graphic file (e.g. gif or jpg).
It means you would like to use GRAPH FILE which has some limitations. The limitations in many cases can be workarounded, but it is not so simple.
If it is sufficient for you just to have all of the report content in one printable and "saveable" file, you can use pdf format using ON TABLE SET ONLINE-FMT PDF.

Regards
Grzegorz

 
Hello Grzegorz

You're right, I'd like to have all the graphics in one graphic. So not several graphics in one pdf file but the output should simply be one graphic and nothing more. Just like I drew the histogram in my inital post.

Eva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top