Focal Point
[CLOSED] graphtype=data option

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

November 12, 2019, 10:59 PM
sh98110
[CLOSED] graphtype=data option
okay, perhaps I am just remembering one too many Summit presentations, but I thought there was a GRAPHTYPE (aka visualization within TABLE) option for the little "Consumer Reports" circles with colors (Green/yellow/red)?

Since it is a PITA to add .gif files in our environment, if there is anything already built into AppStudio 8.2.1, it would be appreciated.

Thanks in advance.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
November 13, 2019, 08:05 AM
BabakNYC
https://www.informationbuilder...developers/graphtype


WebFOCUS 8206, Unix, Windows
November 13, 2019, 09:03 AM
Mike Williams
If your output is HTML, you could do something using Charsets and define them as opposed to using images:

  


-SET &GREEN_ARROW_UP='<span class="Grnarrowup" style="color:008000;font-size:100%;">&|#x25B2;</span>';
-SET &RED_ARROW_DOWN='<span class="Redarrowdn" style="color:FF0000;font-size:100%;">&|#x25BC;</span>';
-SET &YELLOW_CIRCLE='<span class="Yellowcircle" style="color:FFFF00;font-size:100%;">&|#x25CF;</span>';


DEFINE FILE CAR
INDICATOR/A255 = IF SEATS EQ 2 THEN '&GREEN_ARROW_UP'
ELSE IF SEATS EQ 4 THEN '&RED_ARROW_DOWN'
ELSE IF SEATS EQ 5 THEN '&YELLOW_CIRCLE'
ELSE '';
END

TABLE FILE CAR
PRINT
     CAR.BODY.SEATS
     CAR.BODY.INDICATOR
BY  CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET CACHELINES ON
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
     COLUMN=N3,
     JUSTIFY=CENTER,
$
ENDSTYLE
END


This message has been edited. Last edited by: Mike Williams,


WF Version 8105
November 13, 2019, 10:50 AM
sh98110
Babak, thanks for reminding me how brilliant Susan is (and how I much I miss her on this forum). Mike- this is really clever: code works fine, but I didn't get any color- just the characters. Thanks, folks...


WebFOCUS 8
Windows, All Outputs
November 13, 2019, 10:54 AM
sh98110
quick note: added color to the stylesheet- that did the trick:

TYPE=DATA, COLUMN=N3, JUSTIFY=CENTER, color=green, when= seats eq 2, $
TYPE=DATA, COLUMN=N3, JUSTIFY=CENTER, color=red, when= seats eq 4, $
TYPE=DATA, COLUMN=N3, JUSTIFY=CENTER, color=yellow, when= seats eq 5, $

Thanks again....


WebFOCUS 8
Windows, All Outputs
November 13, 2019, 11:00 AM
sh98110
or, you can just add the # to the color codes Mike provided:

-SET &GREEN_ARROW_UP='&|#x25B2;';
-SET &RED_ARROW_DOWN='&|#x25BC;';
-SET &YELLOW_CIRCLE='&|#x25CF;';

Again, thanks to Mike and Babak- always a pleasure.


WebFOCUS 8
Windows, All Outputs
November 13, 2019, 11:03 AM
Doug
quote:
Babak, thanks for reminding me how brilliant Susan is (and how I much I miss her on this forum). Mike- this is really clever: code works fine, but I didn't get any color- just the characters. Thanks, folks...

Babak: I agree, Susannah is missed but her legacy lives on. "FOC_RETD"
Mike: You can set the colors in the 'class'.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206