Focal Point
GRAPHs GRAPHs GRAPHs :)

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4101019331

October 25, 2005, 06:56 AM
Motiejus
GRAPHs GRAPHs GRAPHs :)
I am new in making GRAPHs with WF, so mayby someone could help me in making a GRAPH?

I have a table with raw data:
-------------------------------------------------
| OBJECT_ID | PRICE | LOCATION | TIME |
-------------------------------------------------
| 000000001 | 0800 | AFRICA | 2005-10-25 |
-------------------------------------------------
| 000000001 | 3400 | EUROPE | 2005-10-25 |
-------------------------------------------------
| 000000001 | 1500 | N. AMERRICA | 2005-10-25 |
-------------------------------------------------
| 000000001 | 5500 | S. AMERRICA | 2005-10-25 |
-------------------------------------------------
| ... | ... | ... | ... |
-------------------------------------------------
| 000000001 | 1000 | AFRICA | 2005-10-26 |
-------------------------------------------------
| 000000001 | 3500 | EUROPE | 2005-10-26 |
-------------------------------------------------
| 000000001 | 1100 | N. AMERRICA | 2005-10-26 |
-------------------------------------------------
| 000000001 | 3000 | S. AMERRICA | 2005-10-26 |
-------------------------------------------------

I want to make a GRAPH which represents the price dinamics in diferent locations in time scale.

X axis should be TIME
Y axis should be PRICE
and LOCATION should be represented in different color lines. Confused

I am making this graph in quite inefficient way:
1) making HOLD for every value in LOCATIONs
2) JOIN them all together by TIME column
3) making a graph:
GRAPH FILE AAA1
PRINT
PRICE_1 AS 'Price 1'
.....
PRICE_N AS 'Price N'
ACROSS TIME
...
END

I think this is not an efficient way isn't it? Smiler
Moreover, it is not dinamic (!! Mad )
[of course I can use cycles and make it dynamic Big Grin but how to make it eficient? Confused ]

I think there should be a GRAPH trick, isn't it? Smiler
October 25, 2005, 07:14 AM
Motiejus
I need something like:

GRAPH FILE RAW_DATA
SUM PRICE
ACROSS TIME
BY LOCATION
END

but in one GRAPH (merged) Big Grin
October 25, 2005, 07:20 AM
Tony A
Motiejus,

The bare minimum you will need to graph your data (providing it is in a single file as you detail) is -

GRAPH FILE filename
SUM PRICE
BY LOCATION
ACROSS TIME
ON GRAPH SET LOOKGRAPH LINE
ON GRAPH SET GRMERGE ON
END

Of course, if you then expand your options by using Perspective for Java you can achieve many graph types etc. but for now the above code will set you on your way.

T
October 25, 2005, 07:26 AM
Motiejus
Statement "SET GRMERGE=ON" returns me an "Posibele Error on: Angelo();" Mad

SET GRMERGE=ON
GRAPH FILE RAW_DATA
SUM PRICE
ACROSS TIME
BY LOCATION
END

...maby it is because there are a lot of locations Confused Confused
October 25, 2005, 07:33 AM
Tony A
What version are you using and just how many locations do you have?
October 25, 2005, 07:40 AM
Motiejus
Thanks Tony!!!! Smiler

Your code works!!!!

You are GRAPH guru Big Grin
October 25, 2005, 07:43 AM
Motiejus
What a beatifull graph you can get when there are 43 locations Smiler Smiler Smiler
October 25, 2005, 07:58 AM
Tony A
Glad to be of help
October 25, 2005, 08:17 AM
Motiejus
Tony,

there are 3307 diferent locations Smiler che che Smiler Big Grin
I think this is too much for WF
(at least for release R720533B )
Big Grin

Anyway, I think graph with 3307 different lines whould be too informative Eeker Smiler Smiler

p.s.: even 43 is too much Smiler
October 25, 2005, 08:55 AM
Tony A
Let alone completely cluttered thus rendering it potentially useless to the end user? Unless, of course, you printed it out using a plotter on A00 paper. Roll Eyes Razzer Cool