Note that there are some explanatory texts on larger screens.

plurals
  1. POjqPlot hangs up on DateAxisRenderer
    primarykey
    data
    text
    <p>today I downlaoded the latest version of jqPlot and filled a Plot with data, and I encountered the DateAxisRenderer "hangup" problem. At least I think this might be the problem.</p> <p>I tried to inject this hotfix (http://www.cefolger.net/2012/02/jqplot-crashhanginfinite-loop-in.html), but it's still not working.</p> <p>My setup is the following.</p> <pre><code>&lt;div id="history_chart" stlye="height: 300px; width: 500px;"&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; $(function(){ var history_data = &lt;?php echo json_encode($history_data); ?&gt;; var historyDataRenderer = function(){ console.log(history_data); return history_data; } var history_plit = $.jqplot('history_chart',[], { title: "Tarifhistorie", dataRenderer: historyDataRenderer, axes: { xaxis:{ renderer: $.jqplot.DateAxisRenderer, tickOptions: '%e.%#m.%Y (%#H:%#M:%#S)' }, yaxis:{} } }); }); &lt;/script&gt; </code></pre> <p>The Data I pass through:</p> <pre><code>[["29.02.2012 16:11", "1"], ["26.03.2012 15:56", "2"], ["26.03.2012 15:57", "6"], ["26.03.2012 15:57", "1"], ["27.03.2012 11:33", "3"], ["27.03.2012 11:36", "1"], ["27.03.2012 11:36", "3"], ["27.03.2012 11:36", "2"], ["27.03.2012 11:36", "1"], ["28.03.2012 11:35", "1"], ["28.03.2012 11:38", "1"], ["28.03.2012 11:59", "1"], ["28.03.2012 12:03", "1"]] </code></pre> <p>Formatted as a list:</p> <ul> <li>29.02.2012 16:11,1</li> <li>26.03.2012 15:56,2</li> <li>26.03.2012 15:57,6</li> <li>26.03.2012 15:57,1</li> <li>27.03.2012 11:33,3</li> <li>27.03.2012 11:36,1</li> <li>27.03.2012 11:36,3</li> <li>27.03.2012 11:36,2</li> <li>27.03.2012 11:36,1</li> <li>28.03.2012 11:35,1</li> <li>28.03.2012 11:38,1</li> <li>28.03.2012 11:59,1</li> <li>28.03.2012 12:03,1</li> </ul> <p>Removing the tickOptions and adding the history_data directly + adding brackets around history_data works, but I am not very pleased since the date ticks are 4 days long and I need more precise ticks.</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $.jqplot.config.enablePlugins = true; var history_data = &lt;?php echo json_encode($history_data); ?&gt;; var historyDataRenderer = function(){ //console.log(history_data); for(var i=0;i&lt;history_data.length;i++){ var randString = (""+Math.random(1568)); history_data[i][0] = history_data[i][0] + ":"+randString.substring(2, 4); } console.log(history_data); return history_data; } historyDataRenderer(); var history_plot = $.jqplot('history_chart', [history_data], { title: "Tarifhistorie", /*dataRenderer: historyDataRenderer,*/ axes: { xaxis:{ renderer: $.jqplot.DateAxisRenderer }, yaxis:{ min: 0, max: 10 } }, highlighter: { show: true, sizeAdjust: 7.5 }, cursor: { show: false } }); }); &lt;/script&gt; </code></pre>
    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