Desktop productivity for business analysts and programmers

Increase size of data labels in bar chart in enterprise guide

Reply
New Contributor
Posts: 3

Increase size of data labels in bar chart in enterprise guide

Do we have any option in bar chart and line graph to increase font size of data labels if not then how we can increase it with coding. below I mentioned the code of line graph and bar chart. I also attached both the graph.

 

LINE GRAPH CODING

 

/* -------------------------------------------------------------------
Code generated by SAS Task

Generated on: Friday, January 05, 2018 at 4:51:07 PM
By task: Line Plot1

Input Data: WORK.QUERY_FOR_LOSS_TREND1_0001
Server: SASApp
------------------------------------------------------------------- */

%_eg_conditional_dropds(WORK.SORTTempTableSorted);
/* -------------------------------------------------------------------
Sort data set WORK.QUERY_FOR_LOSS_TREND1_0001
------------------------------------------------------------------- */

PROC SQL;
CREATE VIEW WORK.SORTTempTableSorted AS
SELECT T.Discovery_Year, T.GrossLoss, T.Tolerance, T.OpRiskCapital
FROM WORK.QUERY_FOR_LOSS_TREND1_0001 as T
ORDER BY T.Discovery_Year;
QUIT;
SYMBOL1
INTERPOL=JOIN
POINTLABEL
HEIGHT=10pt
VALUE=NONE
LINE=1
WIDTH=4

CV = _STYLE_
;
SYMBOL2
INTERPOL=JOIN
POINTLABEL
HEIGHT=10pt
VALUE=NONE
LINE=1
WIDTH=4

CV = _STYLE_
;
SYMBOL3
INTERPOL=JOIN
POINTLABEL
HEIGHT=10pt
VALUE=NONE
LINE=1
WIDTH=4

CV = _STYLE_
;
Legend1
FRAME
LABEL=(FONT='Microsoft Sans Serif' HEIGHT=12pt JUSTIFY=LEFT )
;
Axis1
STYLE=1
WIDTH=1
MINOR=NONE

VALUE=(HEIGHT=12pt )

;
Axis2
STYLE=1
WIDTH=1
MINOR=NONE
LABEL=NONE

VALUE=(FONT='/b' HEIGHT=12pt )

;
TITLE;
TITLE1 "Op Risk Capital, Tolerance, Losses";
FOOTNOTE;
PROC GPLOT DATA = WORK.SORTTempTableSorted
;
PLOT GrossLoss * Discovery_Year Tolerance * Discovery_Year OpRiskCapital * Discovery_Year /
OVERLAY
GRID
VAXIS=AXIS1

HAXIS=AXIS2

FRAME LEGEND=LEGEND1
;
/* -------------------------------------------------------------------
End of task code.
------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
TITLE; FOOTNOTE;
GOPTIONS RESET = SYMBOL;

 

 

 

BAR GRAPH CODING

 

/* -------------------------------------------------------------------
Code generated by SAS Task

Generated on: Friday, January 05, 2018 at 4:46:56 PM
By task: Bar Chart1

Input Data: WORK.TRNSTRANSPOSEDQUERY_FOR_LOSSTOLE
Server: SASApp
------------------------------------------------------------------- */

%_eg_conditional_dropds(WORK.SORTTempTableSorted);
/* -------------------------------------------------------------------
Sort data set WORK.TRNSTRANSPOSEDQUERY_FOR_LOSSTOLE
------------------------------------------------------------------- */

PROC SQL;
CREATE VIEW WORK.SORTTempTableSorted AS
SELECT T.Source, T.Loss_Trend1, T.Column1
FROM WORK.TRNSTRANSPOSEDQUERY_FOR_LOSSTOLE as T
;
QUIT;
Axis1


LABEL=NONE
;
Axis2
MINOR=NONE


LABEL=NONE
;
Axis3
LABEL=NONE

 


;
TITLE;
TITLE1 "Actual Losses vs Tolerance";
FOOTNOTE;
PROC GCHART DATA=WORK.SORTTempTableSorted
;
HBAR3D
Source
/
SUMVAR=Column1
GROUP=Loss_Trend1
SHAPE=BLOCK
FRAME TYPE=SUM
SUM
NOLEGEND
COUTLINE=BLACK
MAXIS=AXIS1
RAXIS=AXIS2
GAXIS=AXIS3
PATTERNID=MIDPOINT
;
/* -------------------------------------------------------------------
End of task code.
------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
TITLE; FOOTNOTE;

 

Super User
Posts: 13,926

Re: Increase size of data labels in bar chart in enterprise guide

Posted in reply to rehmanpanjwani

Which version of EG are you running? I am a bit surprised that is is generating Gchart and Gplot code instead of SGPLOT.

 

In Gplot SYMBOL statements are used to set data labels with the POINTLABEL option and the Height suboption controls text size.

You would modify a plot statement to look like:

PLOT GrossLoss * Discovery_Year=1   Tolerance * Discovery_Year=2   OpRiskCapital * Discovery_Year=3

 

to use Symbol1 for the GrossLoss, Symbol2 for the Tolerance and Symbol3 for the OpRiskCapital plots.

 

I don't use EG so I can't point to the menu/submenu you might need.

Ask a Question
Discussion stats
  • 1 reply
  • 166 views
  • 0 likes
  • 2 in conversation