JQPlot Printing

Any body has a simple working example for printing a JQPlot chart.

I'm struggling a bit with this.

I need to print it in both IE and Chrome, and I'm even open to using two different methods based on browser detection.

I also need to print the lines of the X and Y axis along with the graph.

Any help would be greatly appreciated.

Ragards

+5
source share
2 answers

Try this, it works in IE9.

$(document).ready(function() {
        $.jqplot._noToImageButton = false;
         -  -   -  
+1
source

You can find many examples on the jqPlot home page - examples .

, : HTML yout div, :

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

JavaScript :

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

, jqPlot html :

<!--[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" />
-1

All Articles