## How to create data label for bar chart with percent and frequency

Occasional Contributor
Posts: 7

# How to create data label for bar chart with percent and frequency

[ Edited ]

Hi people!

Is it possible to build bar charts with the data label results in percentage and frequency at the same time?

This is a pie chart but is it possible with bar charts?

Thanks for any help!

Super User
Posts: 22,041

## Re: How to create an output including row & total percentages from a 2 by 2 frequency table &amp

Occasional Contributor
Posts: 7

## Re: How to create an output including row

Sorry. I made a mistake In the subject. The question is actually the same, if it's possible to draw a bar chart with the label value in percentage and freq (in the same chart). Like the example I posted. Thanks.
Super User
Posts: 22,041

## Re: How to create data label for bar chart with percent and frequency

If you precalculate the labels then then you can use that variable in the datalabel statement.

You coukd plot two two identical series, but make one 100% transparent.

Or you could try GTL for different options.

Were you thinking of using HBAR, HBARBASIC, OR HBARPARM?

Occasional Contributor
Posts: 7

## Re: How to create data label for bar chart with percent and frequency

Hi Reeza!

I´m using HBAR and VBAR.
SAS Super FREQ
Posts: 1,240

## Re: How to create data label for bar chart with percent and frequency

One way is to overlay a TEXT or SCATTER (with Markerchar) on the bar.  To allow overlays, you have to use a VBARPARM or VBARBASIC.  If you compute your values before hand, and put the freq and % vaues in different columns, yuu can use VBARPARM with DATALABEL to display the response value and display the 2nd value using a TEXT (SAS 9.40M2) plot layer.  If you do not have SAS 9.40M2, use the SCATTER for overlay.

Super User
Posts: 10,416