5

Does any body have have a simple working example to print the JQPlot graph.

I am struggling a bit with it.

I need to print it in both IE and Chrome and I am even open to using 2 diiferent methods based upon browser detection.

Also I need to print the X & Y axis lables along with the graph.

Any help would be highly appreciated.

Ragards

John Slegers
  • 45,213
  • 22
  • 199
  • 169
Rajeev
  • 51
  • 3

2 Answers2

1

Try this, it's working in IE9.

$(document).ready(function() {
        $.jqplot._noToImageButton = false;
         -  -   -  
ronalchn
  • 12,225
  • 10
  • 51
  • 61
-1

You can find a lot of examples at jqPlot Homepage - Examples.

The easiest example I can imagine: In yout HTML-File have a div like this:

<div id="chart1"></div>

And in Your JavaScript do:

$(document).ready(function(){
  var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]);
});

Of course you need to import the library of jqPlot and import it in your html file:

<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="excanvas.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="jquery.jqplot.min.js"></script>
<link rel="stylesheet" type="text/css" href="jquery.jqplot.css" />
Boro
  • 7,913
  • 4
  • 43
  • 85
Sandro L
  • 1,140
  • 18
  • 32