If you use donation forms created by Give plugin for accepting donations, the bar will automatically increase with donation, provided you have linked the campaign instance with donation form created with Give plugin.
The section – Campaign Page Options – How to make Campaign Entries in documentation has detailed steps on how to go about this.
If you are accepting donation through other means, you will need some custom HTML in your campaign to make this happen. Do let us know if you need help.