Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Create Scale

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Create Scale
 Login/Join
 
Gold member
posted
I am trying to create a scale that looks like the following:

| |
5% |------------55%-------------|75%
| |

I have 3 values low (5%), high (75%) and the the actual (55%) that I want to plot.
The actual should be in bold red and the rest is all in black.
Any ideas...?
Thanks

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


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
Gold member
posted Hide Post
OK - I figured out how to do this by joining 3 fields...the only problem I have is that I want the border and dashes to be black and the number to be red like below:
Scale Example
|---------93------|
|----45-----------|

I tried computing the fields and styling the columns and then concatenating them together with a compute but they loose the style.

does anyone have an idea how to style this?
Thanks


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
<FreSte>
posted
Are the number of dashes representing the scale (e.g. 20 dashes make 100) and do you want to have these numbers at the right position (50 in the middle) ??
... and what output is required ?

Can you post some example data; could be helpfull for better understanding

This message has been edited. Last edited by: <FreSte>,
 
Report This Post
Virtuoso
posted Hide Post
what is the required output format

are you thinking of an html or pdf format




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Gold member
posted Hide Post
Its just a single value by a description....when the value comes in I do the following:

VALUE/F3=Value;
CODEA /A05 = FTOA (VALUE,'(F5)',CODEA);
CODEB /A5 = CODEA;
XDASH1/A4 = IF Value LT 10 THEN '----' ELSE '';
XDASH2/A4 = IF (Value FROM 10 TO 99) THEN '--' ELSE '';

-SET &XLN1=IF XVALUE EQ '1' THEN 'A3' ELSE
- IF XVALUE EQ '2' THEN 'A6' ELSE
- IF XVALUE EQ '3' THEN 'A9' ELSE
- IF XVALUE EQ '4' THEN 'A12' ELSE
- IF XVALUE EQ '5' THEN 'A15' ELSE
- IF XVALUE EQ '6' THEN 'A18' ELSE
- IF XVALUE EQ '7' THEN 'A21' ELSE
- IF XVALUE EQ '8' THEN 'A24' ELSE
- IF XVALUE EQ '9' THEN 'A27' ELSE 'A27';

-SET &XLN2=IF XVALUE EQ '9' THEN 'A3' ELSE
- IF XVALUE EQ '8' THEN 'A6' ELSE
- IF XVALUE EQ '7' THEN 'A9' ELSE
- IF XVALUE EQ '6' THEN 'A12' ELSE
- IF XVALUE EQ '5' THEN 'A15' ELSE
- IF XVALUE EQ '4' THEN 'A18' ELSE
- IF XVALUE EQ '3' THEN 'A21' ELSE
- IF XVALUE EQ '2' THEN 'A24' ELSE
- IF XVALUE EQ '1' THEN 'A27' ELSE 'A27';

XLINE1/&XLN1=IF XVALUE EQ '9' THEN '|--------------------------' ELSE
IF XVALUE EQ '8' THEN '|-----------------------' ELSE
IF XVALUE EQ '7' THEN '|--------------------' ELSE
IF XVALUE EQ '6' THEN '|-----------------' ELSE
IF XVALUE EQ '5' THEN '|--------------' ELSE
IF XVALUE EQ '4' THEN '|-----------' ELSE
IF XVALUE EQ '3' THEN '|--------' ELSE
IF XVALUE EQ '2' THEN '|-----' ELSE
IF XVALUE EQ '1' THEN '|--' ELSE '|--' ;

XLINE2/&XLN2=IF XVALUE EQ '9' THEN '--|' ELSE
IF XVALUE EQ '8' THEN '-----|' ELSE
IF XVALUE EQ '7' THEN '--------|' ELSE
IF XVALUE EQ '6' THEN '-----------|' ELSE
IF XVALUE EQ '5' THEN '--------------|' ELSE
IF XVALUE EQ '4' THEN '-----------------|' ELSE
IF XVALUE EQ '3' THEN '--------------------|' ELSE
IF XVALUE EQ '2' THEN '-----------------------|' ELSE
IF XVALUE EQ '1' THEN '--------------------------|' ELSE '--------------------------|';

CODEA /A05 = FTOA (VALUE,'(F5)',CODEA);
CODEB /A5 = CODEA;
CODEC /A150 = XLINE1||XDASH1||XDASH2||CODEB||'%'||XLINE2;


----*** the above code creates the following |--------113%-----| and the value is offset by the number of dashes I add on the let ofr right....It works fine I just need to change the Value to Red. Thanks


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
Gold member
posted Hide Post
Frank - the output is a focexec report on an HTML page coreated in HTML Painter. I had to comment out "ON TABLE SET HTMLCSS ON" since it was destorting my scale...Thanks


8.0.9, Windows
excel / pdf
 
Posts: 89 | Registered: October 21, 2010Report This Post
<FreSte>
posted
Hi,

If the output is only HTML, you can do something like this:

DEFINE FILE CAR
  COLOR/A10 = 
    IF DEALER_COST LT 6000  THEN 'red'   ELSE
    IF DEALER_COST GT 10000 THEN 'green' ELSE 'purple';
  CCM/A100 = COUNTRY | ' - ' | '<span style="color:' | COLOR | ';">' | CAR | '</span>' | ' - ' | MODEL;
END

TABLE FILE CAR
  SUM DEALER_COST
  BY CCM
END


So in your example,

CODEB /A60 = '<span style="font-color:red;">' | CODEA | '%</span>' ;

This message has been edited. Last edited by: <FreSte>,
 
Report This Post
Expert
posted Hide Post
Here is something that may help or confuse.

TABLE FILE CAR
 SUM  
      COMPUTE PCT/P6.2 = PCT.DEALER_COST ;
      COMPUTE GRAPH/A500 = '<div style="width:120px;height:25px;position:relative;">'
                         | '<hr style="position:absolute;left:0px;height:20px;width:1px"/>'
                         | '<hr style="position:absolute;top:10px;height:1px;width:100px"/>'
                         | '<hr style="position:absolute;left:100px;height:20px;width:1px"/>'
                         | '<div style="position:absolute;background-color:white;left:' | PTOA(PCT, '(P3)','A3') | 'px">' | PTOA(PCT, '(P6.2%)','A7') | '</div>'
                         | '</div>' ;
 BY   COUNTRY
END


You will have to do a lot of adjustments, but the concept is there.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Create Scale

Copyright © 1996-2020 Information Builders