Accepted answer

If you look closely, you'll see that the bars for the first and the fourth items are drawn at the same positions and overlap.

The fundamental problem is that the code is using the data itself (which is duplicated) to identify individual elements. If you want to have different elements with the same data values, you'll need to give them unique identifiers so that the code is able to distinguish between them. The scales in the code are set up such that the same input value will map to the same output value, i.e. if you have the same name, the bars will be drawn at the same position.

One way of solving this problem would be to use a unique ID as input to the scale functions and then a formatter to make the labels from this ID.

Related Query

More Query from same tag