# Convert Histogram from frequency of string length to percentage

I have the histogram:

dataPnJ = StringLength[StringSplit[ExampleData[{"Text", "PrideAndPrejudice"}]]];
Histogram[dataPnJ]


I am trying to make the histogram show what percentage of the total pool is the string length representing. So like if 30% of the text is 3 letter words the bin will be labeled 3 and will go up to 30%.

Histogram[dataPnJ, {1}, "Probability",
Ticks -> {Automatic, {#, PercentForm @ #} & /@ Range[0, .5, .1]},
LabelingFunction -> (Placed[ PercentForm @ #, Tooltip] &)]


You can also use HistogramList to get a list of bar heights and use it with BarChart:

heights = HistogramList[dataPnJ, {1}, "Probability"][[2]];

BarChart[Labeled[#, Rotate[PercentForm[#, {5, 3}], 90 Degree], Above] & /@ heights,
BarSpacing -> 0,
ChartLabels -> Range[Length @ heights],
Ticks -> {Automatic, {#, PercentForm @ #} & /@ Range[0, .5, .1]},
ImageSize -> Large]


Riffing off of @kglr's excellent answer, we can go a little further and fulfill all your requirements regarding labeling of the bars within Histogram, without having to build our own BarChart:

dataPnJ = StringLength[StringSplit[ExampleData[{"Text", "PrideAndPrejudice"}]]];

Histogram[
dataPnJ, {1}, "Probability",
Ticks -> {Range[20], {#, PercentForm@#} & /@ Range[0, .5, .1]},
LabelingFunction -> (Placed[
Rotate[PercentForm@Round[#, 0.001], 90 Degree], Above
] &)
]