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] Displaying data labels from different field in PNG Chart

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Displaying data labels from different field in PNG Chart
 Login/Join
 
Member
posted
Hi,

Has anyone plotted a chart using a numeric field but used a alphanumeric field to display the data labels? I have a line chart where I am plotting the average service time over several weeks. Average service time is a numeric field which contains the average service time in minutes with decimal places. I would like to display the average service time in minutes and seconds (mm:ss) format as the associated data label, is there a way to do that? While I can compute another field in alphanumeric format to show mm:ss, I was wondering if there was a way to use the computed field for the data label.

Is there a way to do this for a PNG chart as I am trying to reference the chart in a compound document?

Thank you in advance for your suggestions!
~JL
WebFOCUS 8.2.0.4

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 5 | Registered: November 04, 2019Report This Post
Guru
posted Hide Post
Try this,
GRAPH FILE CAR
SUM SALES
COMPUTE TT1/A30V = 'HH:MM:SS'|| ' : ' | FPRINT(SALES, 'D8', 'A10');
-*COMPUTE TT1/A30V = COUNTRY || ' : ' | FPRINT(SALES, 'D8', 'A10');

BY COUNTRY

WHERE BODYTYPE EQ 'SEDAN';
WHERE COUNTRY NE 'ITALY';
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 400
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END

-*INCLUDE=IBFS:/WFC/Global/Themes/Standard/Default/theme.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $

TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=TT1, BUCKET=tooltip, $
*GRAPH_JS_FINAL
dataLabels: {
visible: true,
position: 'bottom',
formatCallback: function(d) {return d.tooltip1;}
},
htmlToolTip: {enable: true, snap: false }
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getLegendArea(),false);
*GRAPH_JS_FINAL
"series": [
{
"dataLabels": {
"clipToContainer": false,
"visible": true,
"color": "rgba(255, 255, 255, 1)",
"position": "center",
"content": "{{series_label}}, {{metadata_value(\"value\", \"dataLabels\")}}",
"font": "bold 7.5pt 'ARIAL'"
},
"series": "all"
}
],

"pieProperties": {
"holeSize": "0%"
},
"blaProperties": {
"seriesLayout": "stacked",
"orientation": "horizontal",
"barGroupGapWidth": 0.54
},

"agnosticSettings": {
"chartTypeFullName": "Bar_Stacked"
}
*END
ENDSTYLE
END


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Member
posted Hide Post
Thank you, vaayu.

Adding this worked for HTML5 chart:
dataLabels: {
visible: true,
position: 'bottom',
formatCallback: function(d) {return d.tooltip1;}
},

Is there anyway to get this to work for a PNG chart?

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


WebFOCUS 8.2.0.4
 
Posts: 5 | Registered: November 04, 2019Report 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] Displaying data labels from different field in PNG Chart

Copyright © 1996-2020 Information Builders