First have a look at
docs.limesurvey.org/How+to+contribute+new+features because this feature will be useful to everybody.
Then I think a good first start is to have a look at qanda.php where you will find a function for each question type like "do_shorttext()" which creates the questions HTML. You can then add a new question attribute like "Show stats at question" (I think common.php or common_functions.php holds the question attribute data).
The at qanda.php if that attribute is enable, add some additional code. Code for generating tgraphs can be found at statistics_user.php and /admin/statistics.php and /admin/statistics_functions.php.