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...? ThanksThis message has been edited. Last edited by: Kerry,
8.0.9, Windows excel / pdf
February 22, 2011, 03:13 PM
MMcDonald
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
February 22, 2011, 04:00 PM
<FreSte>
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 understandingThis message has been edited. Last edited by: <FreSte>,
February 22, 2011, 04:34 PM
FrankDutch
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
February 22, 2011, 04:40 PM
MMcDonald
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 '--------------------------|';
----*** 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
February 22, 2011, 04:43 PM
MMcDonald
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
February 23, 2011, 04:24 AM
<FreSte>
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