October 25, 2005, 06:56 AM
MotiejusGRAPHs 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.
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?
Moreover, it is not dinamic (!!
)
[of course I can use cycles and make it dynamic
but how to make it eficient?
]
I think there should be a GRAPH trick, isn't it?
October 25, 2005, 07:14 AM
MotiejusI need something like:
GRAPH FILE RAW_DATA
SUM PRICE
ACROSS TIME
BY LOCATION
END
but in one GRAPH (merged)
October 25, 2005, 07:20 AM
Tony AMotiejus,
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
MotiejusStatement "SET GRMERGE=ON" returns me an "Posibele Error on: Angelo();"
SET GRMERGE=ON
GRAPH FILE RAW_DATA
SUM PRICE
ACROSS TIME
BY LOCATION
END
...maby it is because there are a lot of locations
October 25, 2005, 07:33 AM
Tony AWhat version are you using and just how many locations do you have?
October 25, 2005, 07:40 AM
MotiejusThanks Tony!!!!
Your code works!!!!
You are GRAPH guru
October 25, 2005, 07:43 AM
MotiejusWhat a beatifull graph you can get when there are 43 locations
October 25, 2005, 07:58 AM
Tony AGlad to be of help
October 25, 2005, 08:17 AM
MotiejusTony,
there are 3307 diferent locations
che che
I think this is too much for WF
(at least for release R720533B )
Anyway, I think graph with 3307 different lines whould be too informative
p.s.: even 43 is too much
October 25, 2005, 08:55 AM
Tony ALet 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.