I found a ranking chart (also known as a Pareto chart) in the book Data Analysis with Open Source Tools. So I tried to build an example in a book using ggplot2.
The following figure is given in the book: note that the coordinates are inverted so that the names of countries are displayed along the Y axis, which is more readable. The ruler is the CDF (cumulative distribution function) of the data.
(Source: data analysis with open source tools)
To make partial simulated data:
country = c('US', 'Brazil', 'Japan', 'India', 'Germany', 'UK', 'Russia', 'France') sales = c(40, 14, 7, 6, 2.8, 2, 1.8, 1)
Then I used stat_ecdf in ggplot2 to build the CDF:
ggplot(data=df) + stat_ecdf(aes(x=sales))
But the figure looked like this:

If the X axis represents sales, but not the country.
I found another implementation here . But it is implemented by a linear diagram along with an explicit total, which is very different from the example in the book.
Is there an approach to constructing a Pareto diagram as the first digit?
EDIT
I made a mistake in the content of the bar line. This is not a CDF, but a cumulative proportion.
In the CDF, which displays the value in its percentile rank, the US percentile ranking is 100. But in the ranking chart, the percentage of US is about 45%, which indicates that sales in the US account for 45% of total sales.
Accordingly, I should not use stat_ecdf to build a ranking chart.