Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] 2 Data Labels - PDF Bar Graph
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] 2 Data Labels - PDF Bar Graph
 Login/Join
 
Platinum Member
posted
Hello

I am working on a bar graph and struck at data labels. Below is the sample with CAR file.
Is it possible to have COUNT of CARS for each COUNTY as additional data label inside each bar? Basically I am trying to show 2 data labels, SALES and CARS count. Please suggest.

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF

GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET UNITS INCHES
ON GRAPH SET HAXIS 6
ON GRAPH SET VAXIS 3
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LETTER, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setDataTextDisplay(true);
setDataTextPosition(1);
setTextFormatPreset(getDataText(),6);
*END
ENDSTYLE
END  

Thank you.

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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 135 | Registered: July 21, 2011Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hello,
Are you looking similar to this?
I tried this, may be this can be useful.
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
-*SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF

TABLE FILE CAR
SUM
COMPUTE COUNTRY_CNT/I2=1;
*
BY CAR
ON TABLE HOLD AS FIN_DATA FORMAT ALPHA
END
-RUN

GRAPH FILE FIN_DATA
-* Created by Info Assist for Graph
SUM SALES AS ''
COUNTRY_CNT AS ''
BY COUNTRY NOPRINT
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET UNITS INCHES
ON GRAPH SET HAXIS 6
ON GRAPH SET VAXIS 3
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
-*INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LETTER, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setDataTextDisplay(true);
setDataTextPosition(1);
-*setTextFormatPreset(getDataText(),6);

setSeriesType(1,2);

*END

ENDSTYLE
END    

This message has been edited. Last edited by: pav,
 
Posts: 107 | Registered: February 02, 2016Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I have some updated code.

For getting the count of the cars to display on the bar, I used a line graph to plot in the bar and eliminating the lines between the labels
  [code] ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET HTMLENCODE=ON
-*SET ARGRAPHENGINE=JSCHART
SET EMBEDHEADING=ON
SET GRAPHDEFAULT=OFF

TABLE FILE CAR
SUM
COMPUTE COUNTRY_CNT/I2=1;
*
BY CAR
ON TABLE HOLD AS FIN_DATA FORMAT ALPHA
END
-RUN

GRAPH FILE FIN_DATA
-* Created by Info Assist for Graph
SUM SALES AS ''
COUNTRY_CNT AS ''
BY COUNTRY NOPRINT
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT OFF
ON GRAPH SET UNITS INCHES
ON GRAPH SET HAXIS 6
ON GRAPH SET VAXIS 3
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
-*INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, PAGESIZE=LETTER, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(0), true);
setDataTextDisplay(true);
setDataTextPosition(1);
setSeriesType(1,2);
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),5.0);
setGridStepAuto(getY1MajorGrid(),false);
setGridStep(getY1MajorGrid(),0.5);
setFillColor(getSeries(1),new Color(225,225,225,225));
setLineWidth(getSeries(1),0);

setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);

*END

ENDSTYLE
END   
[/CODE]
 
Posts: 107 | Registered: February 02, 2016Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] 2 Data Labels - PDF Bar Graph

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.