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] Gauge Whole Numbers

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Gauge Whole Numbers
 Login/Join
 
Gold member
posted
Can anyone tell me how to only have whole number ticks on this chart? Thanks

GRAPH FILE IBISAMP/CAR
SUM CNT.CAR
WHERE COUNTRY EQ 'ENGLAND'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET LOOKGRAPH GAUGE1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
TYPE=HEADING, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=10, COLOR=RGB(0 0 0), STYLE=BOLD, $
TYPE=FOOTING, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=8, COLOR=RGB(0 0 0), STYLE=BOLD, $
*GRAPH_SCRIPT
setCurveFitEquationDisplay(false);
setPlace(true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END

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


WF 8.0.08 (Prod); WF 8.2.06 (Dev)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report This Post
Master
posted Hide Post
try adding in setTextFormatPreset(getY1Label(),1);
 
GRAPH FILE IBISAMP/CAR
SUM CNT.CAR
WHERE COUNTRY EQ 'ENGLAND'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET LOOKGRAPH GAUGE1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
TYPE=HEADING, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=10, COLOR=RGB(0 0 0), STYLE=BOLD, $
TYPE=FOOTING, JUSTIFY=CENTER, FONT='CALIBRI', SIZE=8, COLOR=RGB(0 0 0), STYLE=BOLD, $
*GRAPH_SCRIPT
setCurveFitEquationDisplay(false);
setPlace(true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTextFormatPreset(getY1Label(),1);
*END
ENDSTYLE
END


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Gold member
posted Hide Post
Thanks for the response. I tried that earlier, but then it gave me two marks on the dial for "1", two for "2", etc. I can't tell if the duplicate tick marks are major or minor ones...


WF 8.0.08 (Prod); WF 8.2.06 (Dev)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report This Post
Master
posted Hide Post
I found some really good docs on Gauge and Axis formatting here:


I am actually surprised on the amount of formatting that you can do to the guage chart.

Check out the code below:
  
GRAPH FILE ibisamp/car
SUM CNT.CAR.COMP.CAR/I11 AS 'Car Count'
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH GAUGE1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setFillColor(getGaugeBand1(),new Color(255,0,0));
setFillColor(getGaugeBand2(),new Color(255,255,0));
setFillColor(getGaugeBand3(),new Color(255,255,0));
setFillColor(getGaugeBand4(),new Color(0,255,0));
setFillColor(getGaugeBand5(),new Color(0,255,0));
*GRAPH_JS_FINAL
"gaugeProperties": {
    "startAngle": 130,
    "endAngle": 50,
    "layout": "gauge",
    "groupLabel": {
        "visible": true,
        "font": "bold 5em Sans-Serif",
        "color": "black"
    },
    "totalLabel": {
        "visible": true,
        "font": "bold 30px Sans-Serif",
        "color": "DarkMagenta",
        "numberFormat": "auto"
    },
    "fill": {
        "color": "lightgray"
    },
    "needle": {
        "color": "DarkMagenta",
    },
    "needleBase": {
        "size": "7%",
        "color": "lightblue",
        "border": {
            "width": 5,
            "color": "darkblue",
            "dash": ""
        }
    },
    "axisWidth": "5%",
    "axisTickLength": "15%",
    "axisMinorTickLength": "10%",
    "outerBorder": {
        "shape": "tight",
        "width": "10%",
        "fill": {
            "color": "lightblue"
        },
        "border": {
            "width": 5,
            "color": "darkblue",
            "dash": ""
        }
    }
},
"yaxis": {
    "intervalMode": "interval",
    "intervalValue": 1,
    "numberFormat": "auto",
    "labels": {
        "font": "bold 30pt Sans-Serif",
        "color": "black"
    },
    "majorGrid": {
        "visible": true,
        "lineStyle": {
            "width": 4,
            "color": "black",
            "dash": ""
        },
    },
    "minorGrid": {
        "visible": true,
        "count": 1,
        "lineStyle": {
            "width": 1,
            "color": "darkgray",
            "dash": ""
        },
    }
},
"series": [{
    "series": 0,
    "color": "lightblue",
    "border": {
        "width": 2,
        "color": "darkblue",
        "dash": ""
    }
}]

*END
ENDSTYLE
END


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Gold member
posted Hide Post
Wow, lots of good stuff here. Thanks. Only problem is, it looks like any JSON I do doesn't happen. For instance, this is in your first link:

  
The following version of the request sets the gauge chart layout to 'simple':

GRAPH FILE WF_RETAIL_LITE
SUM COGS_US
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH GAUGE1
ON GRAPH SET STYLE *
*GRAPH_JS
"gaugeProperties": {"layout": "simple"}
*END
ENDSTYLE
END


The picture shows this nice graph with no needle and only a number in the middle. However when I run it, I get the same old graph format I've been getting. Any ideas? Thanks again.


WF 8.0.08 (Prod); WF 8.2.06 (Dev)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report This Post
Master
posted Hide Post
Weird. Maybe your version of WebFOCUS. Did you try it in your 8.2.04 Dev environment?


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Gold member
posted Hide Post
I actually don't have that environment right now so I can't test it, but I'll take your word for it.


WF 8.0.08 (Prod); WF 8.2.06 (Dev)
 
Posts: 83 | Location: OK | Registered: November 19, 2015Report 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] Gauge Whole Numbers

Copyright © 1996-2020 Information Builders