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.
Here is an example of formatting the labels and tooltips
DEFINE FILE CAR
COUNTRY_Def/A20V= IF CAR.ORIGIN.COUNTRY EQ 'ITALY' THEN 'CHILD/DEPENDANT' ELSE
IF CAR.ORIGIN.COUNTRY EQ 'ENGLAND' THEN 'SPOUSE/PARTNER' ELSE
IF CAR.ORIGIN.COUNTRY EQ 'W GERMANY' THEN 'EMPLOYEE/SELF';
END
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CNT.CAR.COMP.CAR AS ' '
BY CAR.ORIGIN.COUNTRY_Def
WHERE CAR.ORIGIN.COUNTRY IN ( 'ENGLAND' , 'ITALY' , 'W GERMANY' );
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPieFeelerTextDisplay(1);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LEGAL, $
TYPE=DATA, COLUMN=N1, BUCKET=color, $
TYPE=DATA, COLUMN=N2, BUCKET=measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillColor(getSeries(2),new Color(87,182,150));
setFillColor(getSeries(0),new Color(0,148,215));
setFillColor(getSeries(1),new Color(0,82,115));
setDisplay(getLegendArea(),false);
setTextFormatPreset(getPieSliceLabel(),2);
setPieLabelDisplay(3);
setPieFeelerTextDisplay(2);
setDataTextDisplay(true);
setFontSizeAbsolute(getPieSliceLabel(),true);
setAutofit(getPieSliceLabel(),false);
setPlaceResize(getPieSliceLabel(),0);
setFontSizeAbsolute(getPieSliceLabelInside(),true);
setAutofit(getPieSliceLabelInside(),false);
setPlaceResize(getPieSliceLabelInside(),0);
setFontSizeInPoints(getPieSliceLabel(),18);
setFontSizeInPoints(getPieSliceLabelInside(),18);
setFontSizeInPoints(getPieRingLabel(),24);
setFillColor(getPieRingLabel(),new Color(0,47,85));
setFillColor(getPieSliceLabel(),new Color(0,83,115));
setFillColor(getPieSliceLabelInside(),new Color(0,83,115));
setPieSliceDetach(getSeries(*), 0);
setPieSliceDelete(0,false);
setPieSliceDelete(1,false);
setPieSliceDelete(2,false);
setPiesPerRow(4);
setTextFormatPreset(getPieRingLabel(),1);
setDisplay(getPieRingLabel(),false);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "75%",
},
"agnosticSettings": {
"chartTypeFullName": "Pie_Ring"
},
"series":[{
"series": "reset",
"tooltip": "<div style='text-align:center'><span style='font-family:Times New Roman;font-size:30px;font-weight:700'>{{series_percent}}</span><br>[b]{{series_label}}[/b]</div>"
}],
"dataLabels": {
"visible": true,
"formatCallback": function(data, series, group, dataset){
return '<div style="text-align:center"><span style="font-family:Times New Roman;font-size:50px;font-weight:700">' + Math.round(data.value / dataset.total * 10000)/100 + '%</span><br>' + this.getSeries(series).label +'</div>';
}
}
*END
ENDSTYLE
END
-RUN
Excellent. Glad to help. There's a lot of good stuff in those charting docs.
If you're using a modern browser that utilizes ES6 ( almost every browser but Internet Explorer ), you can use template literals to create your labels https://caniuse.com/#feat=template-literals