Note that there are some explanatory texts on larger screens.

plurals
  1. POPrint issue with JQplot on IE
    primarykey
    data
    text
    <p>I am trying to print my graph and it prints properly through Firefox and Chrome.</p> <p>But if i try to print it with IE, it shows me the graph canvas HTML tags behind the graph. as u seen in the image. and also it placed the graph axis text all over the graph.. :(</p> <p>i tried the below solution which says it resolves the issue but it dint for me :(</p> <p><a href="http://blog.muonlab.com/2010/06/02/getting-position-absolute-canvas-elements-to-print-correctly-in-ie/" rel="nofollow noreferrer">http://blog.muonlab.com/2010/06/02/getting-position-absolute-canvas-elements-to-print-correctly-in-ie/</a></p> <p>below screenshot of the issue. </p> <p><img src="https://i.stack.imgur.com/pWVv3.png" alt="IE issue when jqplot is printed"></p> <p><strong>HTML</strong></p> <pre><code> &lt;!doctype html&gt; &lt;html lang="en" class="no-js master"&gt; &lt;head&gt; &lt;!-- jQuery Flot Graph Widget. exCanvas.js needed for IE --&gt; &lt;link class="include" rel="stylesheet" type="text/css" href="/css/jquery.jqplot.css" /&gt; &lt;!-- End additional plugins --&gt;&lt;!--[if lt IE 9]&gt;&lt;script language="javascript" type="text/javascript" src="/js/excanvas.min.js"&gt;&lt;/script&gt;&lt;![endif]--&gt; &lt;script class="include" type="text/javascript" src="/js/jquery.jqplot.min.js"&gt;&lt;/script&gt; &lt;!-- Additional plugins go here --&gt; &lt;script class="include" type="text/javascript" src="/js/jqplot/jqplot.canvasTextRenderer.min.js"&gt;&lt;/script&gt; &lt;script class="include" type="text/javascript" src="/js/jqplot/jqplot.canvasAxisLabelRenderer.min.js"&gt;&lt;/script&gt; &lt;script class="include" type="text/javascript" src="/js/jqplot/jqplot.canvasAxisTickRenderer.min.js"&gt;&lt;/script&gt; &lt;script class="include" type="text/javascript" src="/js/jqplot/jqplot.categoryAxisRenderer.min.js"&gt;&lt;/script&gt; &lt;script class="include" type="text/javascript" src="/js/jqplot/jqplot.barRenderer.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="mainCont"&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>JSON Data</strong></p> <pre><code>{ "graphData":[["06-2011",20.0],["07-2011",0.0],["09-2011",0.0],["10-2011",0.0],["11-2011",100.0],["12-2011",0.0],["01-2012",0.0],["02-2012",0.0],["03-2012",0.0],["04-2012",0.0],["05-2012",0.0]], "yAxisLabel" : "Data per month", "graphTitle" : "12 month "} </code></pre> <p><strong>JS code</strong></p> <pre><code>$('.print', context).live("click", function(e) { printGraph(data.graphData, data.yAxisLabel, data.graphTitle); } function printGraph(graphData, yAxisLabel, graphTitle){ var graphWrapper = $(document.createElement('div')); graphWrapper.attr('id', 'edd-graph').css('width','490px'); var graphID = graphWrapper.attr('id'); $('#mainCont').append(graphWrapper); var plot = $.jqplot(graphID, [graphData], { series:[{renderer:$.jqplot.BarRenderer}], seriesDefaults: {shadow: false, rendererOptions: {barWidth:20} }, seriesColors: [ "rgba(255, 81, 82, 1)" ], axes: { xaxis: { renderer: $.jqplot.CategoryAxisRenderer, label: '', labelRenderer: $.jqplot.CanvasAxisLabelRenderer, tickRenderer: $.jqplot.CanvasAxisTickRenderer, max:90, min:10, tickOptions: { angle: -45, fontFamily: 'arial', fontSize: '7.2pt' } }, yaxis: { label: yAxisLabel, labelRenderer: $.jqplot.CanvasAxisLabelRenderer, labelOptions: { fontFamily: 'arial', fontSize: '8.5pt' }, tickOptions: { fontFamily: 'arial', fontSize: '7.2pt' } } }, grid: { drawGridLines: true, // wether to draw lines across the grid or not. gridLineColor: '#efefef', // *Color of the grid lines. background: '#ffffff', // CSS color spec for background color of grid. borderColor: '#999999', // CSS color spec for border around grid. borderWidth: 0.2, // pixel width of border around grid. shadow: false } }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload