Focal Point
[Solved] Advance Graphics Reference Line

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

September 18, 2008, 07:53 AM
Doug
[Solved] Advance Graphics Reference Line
How can a reference line be added to a bar chart? The value for the reference line would come from a dynamic variable which is set and DEFINEd prior to the GRAPH FILE [filename]. But how does it get displayed within the graph? While we’re at it, how about adding a trend line to the same graph?

Thanks, Doug

This message has been edited. Last edited by: Doug,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 18, 2008, 07:57 AM
Tom Flynn
Doug,

If you SEARCHED on REFERENCE LINE, 4 pages of threads, all of your questions would be answered...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
September 18, 2008, 08:01 AM
Doug
Thanks Tom, I searched on "advanced graphics line" and didn't get relevant info. I did the "reference line" search and did find a few "reference line" results mixed in with many "reference" and "line" results. It's better then my 1st search results.
September 18, 2008, 08:32 AM
nubi
quote:
Originally posted by Doug:
Thanks Tom, I searched on "advanced graphics line" and didn't get relevant info. I did the "reference line" search and did find a few "reference line" results mixed in with many "reference" and "line" results. It's better then my 1st search results.


thats how many search engines work- you basically have to get a bit clever with them and try and think of the terms others would have used when asking the question...

i would say 95% of my questions i don't bother my mentors with are solved by using the search, there is an awful lot of info in there, it's a case of weeding out out what you need...


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
September 18, 2008, 08:16 PM
Doug
Be nice now nubi, I know how search engines work and I'm not afraid to use them. Perspective for Java had what I needed. I do, normally, find what I'm looking for here in The WebFOCUS World...

Anyway, here's what I was looking for, and it works great:

setReferenceLine (getY1Axis(), 0, 45000);
setLineWidth (getReferenceLine (getY1Axis(), 0), 3);
setFillColor (getReferenceLine (getY1Axis(), 0), new Color (255, 0, 0));

NOTE, FYI: this is good for a bar chart with a yaxis gt 45000, as in:
GRAPH FILE CAR
SUM DEALER_COST
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH VBAR...

-Doug
September 19, 2008, 02:48 AM
nubi
no drama intended i just didn't know if you wre one of these users who didn't - it seems posts on here could actually be answered with a search through the archives but many people complain of not finding the results they need so its worth reiterating that search engines are 'dumb' and you need to make them 'smart'


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
September 19, 2008, 08:54 AM
Doug
No problem... Your clarification is accepted...