Want to build a widget which gives price history on Drupal 7
I've just come across a module called Track Field Changes which may be ideal for you needs.

I found the documentation a bit lacking however but to get it to work I:


Install module
Visit /admin/config/system/track_field_changes and select your product node type
Save the configuration and then product will appear as a menu item in the left menu. Click it.
Select the price field and again save the configuration.
Create a new view that shows content of the type of your products.
Add the field called "Field Tracker: Value After (Value After)"


This will then show a log of all of your price changes. To then turn this into a graph check out the Views Charts module.