Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML5: saving the chart as an image on the server
    primarykey
    data
    text
    <p>Who knows about rgraph and HTML5? ( <a href="http://www.rgraph.net" rel="nofollow">http://www.rgraph.net</a> )</p> <p>The code of my chart is the following and my problem is that I can't save the canvas (image) on the server even following their suggestion.</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="X-UA-Compatible" content="chrome=1"&gt; &lt;title&gt;Title&lt;/title&gt; &lt;meta name="keywords" content="rgraph javascript charts html5 canvas basic example" /&gt; &lt;meta name="description" content="A basic example of an RGraph chart for implementation help" /&gt; &lt;meta name="googlebot" content="NOODP"&gt; &lt;!-- Place this tag in your head or just before your close body tag --&gt; &lt;script type="text/javascript" src="https://apis.google.com/js/plusone.js"&gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.common.core.js" &gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.common.context.js" &gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.common.annotate.js" &gt;&lt;/script&gt; &lt;script src="../RGraph.common.tooltips.js" &gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.common.zoom.js" &gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.common.effects.js" &gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.common.key.js" &gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.line.js" &gt;&lt;/script&gt; &lt;script src="../libraries/RGraph.common.key.js" &gt;&lt;/script&gt; &lt;!--[if lt IE 9]&gt;&lt;script src="../excanvas/excanvas.original.js"&gt;&lt;/script&gt;&lt;![endif]--&gt; &lt;script src="../libraries/jquery.min.js" &gt;&lt;/script&gt; &lt;script&gt; window.onload = function () { var line1 = new RGraph.Line('line1', [3,56,22,7,84,8,34,1,1], [3,4,45,0,5,97,46,29,7]); line1.Set('chart.background.grid', true); line1.Set('chart.linewidth', 3); line1.Set('chart.gutter.left', 35); line1.Set('chart.hmargin', 5); if (!document.all || RGraph.isIE9up()) { line1.Set('chart.shadow', true); } line1.Set('chart.tickmarks', null); line1.Set('chart.units.post', ''); line1.Set('chart.colors', ['#FA4E1D', '#2D659A']); line1.Set('chart.background.grid.autofit', true); line1.Set('chart.background.grid.autofit.numhlines', 10); line1.Set('chart.background.grid.autofit.numvlines', 29); line1.Set('chart.curvy', 0); line1.Set('chart.curvy.factor', 0.25); line1.Set('chart.labels',['1','2','3','4','5','6','7','8','9']); line1.Set('chart.title','Title of the Chart'); line1.Set('chart.key.text.size',7); line1.Set('chart.key',['A','B']); line1.Set('chart.key.shadow','shadow'); line1.Set('chart.key.position','graph'); line1.Set('chart.ymax',200); line1.Draw(); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;center&gt;&lt;h2&gt;My title&lt;/h2&gt;&lt;center&gt; &lt;!-- 2/3. This is the canvas that the graph is drawn on --&gt; &lt;div style="text-align: center"&gt; &lt;canvas id="line1" width="300" height="180"&gt;[Please wait...]&lt;/canvas&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The suggestion is at the end of this page: <a href="http://www.rgraph.net/docs/index.html#image" rel="nofollow">http://www.rgraph.net/docs/index.html#image</a> at the specific paragraph "Saving the chart as an image on the server". My only result is a 0-lenght file .png inside my server.</p> <p>Could someone help me? Thanks in advance.</p> <p>Mattew</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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