admin管理员组

文章数量:1305665

I need to show a graph(piegraph and XYgraph) in HTML file. I have used some free tool created an image and I am trying to show this on HTML.

But, we need to place this image in shared folder or in a server to get accessed by HTML.Our client is not satisfied with both approaches.

Can some please let me know whether there is any way where I can pass data directly to html file. The data will be in csv file and it may contain some thousands of rows.

Thanks,

I need to show a graph(piegraph and XYgraph) in HTML file. I have used some free tool created an image and I am trying to show this on HTML.

But, we need to place this image in shared folder or in a server to get accessed by HTML.Our client is not satisfied with both approaches.

Can some please let me know whether there is any way where I can pass data directly to html file. The data will be in csv file and it may contain some thousands of rows.

Thanks,

Share Improve this question asked Aug 1, 2012 at 6:35 PraveenPraveen 531 gold badge1 silver badge8 bronze badges 1
  • 1 How does this not have the same problem--any HTML file will have to be accessed somehow, by email, shared drive, web server, or something. – ErikE Commented Aug 1, 2012 at 6:39
Add a ment  | 

2 Answers 2

Reset to default 3

There is a Javascript framework that renders really pretty charts: http://www.highcharts./

You can use one of many CSV Javascript parsers: Javascript code to parse CSV data

If you then write some javascript code to extract your CSV data, and pass it to highcharts, you've got a very nice interactive chart.

The alternative, if you want to use your existing images, is to encode the images as base64 directly in the html file: http://webcodertools./imagetobase64converter/

As an alternative you can also look at the Dojo Toolkit (http://dojotoolkit/), its a Javascript toolkit with some really nice features including charting.

本文标签: javacreate a graph in html using data in csvStack Overflow