How to plot a chart from CSV uploaded in a content type? I am uploading TXT and CSV files in a content type. While displaying it, 
I have to show that as a chart when users viewing the content of that content type.

I have tried using the Charts module, etc. Though I am able to plot the chart reading from a file by giving absolute path, I am not able to do it dynamically. Is there a better way of doing this (using Drupal 7)?
The Easychart module may be close to what you're looking for. It comes with these facilities:


Pasting of CSV data to create charts from it.
Entering an URL pointing to a CSV file containing the data to be charted.


For an extremely short demo of these facilities, have a look at this video.

It is a graphical user interface, using the Highcharts javascript library as its charting engine (which may require a commercial license though). It claims to support every Highcharts chart-type and option.

Some more details about this module:


It defines a new content type (= Chart) used to add charts to your site.
It creates a chart widget that can be used in your own content types.
It integrates with the WYSIWYG module and provides an editor button to add charts to your WYSIWYG content (CKeditor and TinyMCE are supported).
It provides an intuitive interface to configure charts through the Easychart plugin.
The Government of Flanders contains some real world examples of a Drupal website with some charts created with Easycharts (ignore the text on that page if you're not familiar with this language, just concentrate on the charts).


If you're using an URL pointing to a CSV file with data to be charted, then be aware of what's mentioned in comment nr 5 of the issue about "EasyChart data doesn't update unless I edit and save the chart node", i.e.: 


  For performance reasons, the external csv data is only updated when cron runs.


Resources:


Module documentation.
Video demonstrations:


Easychart (quick) demo
Easychart - visual editor for Highcharts (Drupal demo).
Easychart powered dashboard (proof of concept)



Notes:

(1): To resolve an error like "Highcharts not defined" (as per your comment below this answer, you may want to have a look at the issue titled "Highcharts is not defined". Comment # 2 in it includes a possible explanation for that error, ie:


  It was a permissions issue on the library. For some reason the highcharts library had permissions set to: drwx------@
  
  This worked fine on my local machine, but not on shared hosting. I changed them to: drwxr-xr-x to match all the other libraries. 


(2): From the Easychart project page:


  Make sure to clear the website's css-js cache after installing the javascript dependencies


(3): The Highcharts library needs to be placed in /sites/all/libraries/highcharts (as mentioned also in the README.txt)