I am getting data from a database that I would like to use to make a bar chart.
The data looks like a single array of numbers:
Code: Select all
[1, 1, 2, 3, 2, 1]
I've tried making a bar chart but it is displaying each value as a separate bar but I would like the chart to have a bar for each number, for ex. a bar chart for all the 1, all the 2 and the 3. So the 1 bar would be the longest. Instead of bar for 1, a bar for 1, a bar for 2 etc.
Here is a codepen example of how the data is currently being displayed: https://codepen.io/yjacobs/pen/ExWoyeV
Thanks so muc!