I have created a simple code example for you. Hope this helps:)
If you change the data, you will see that the color and size of th bar change accordingly