Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Everything in the accordion is hidden until it is expanded, which means it is dimensionless. You need to wait until the portion of the DOM your accordion chart is contained in is shown, and then plot the graph. If you look at the ui.html example included in the latest release of jqPlot, you'll see this:</p> <p>Here, the plot is created at a div named chart1, which is inside a hidden jQuery UI Tab:</p> <pre><code>plot1 = $.jqplot('chart1', [l1, l2, l3], { title: "I was hidden", lengend:{show:true}, series:[{},{yaxis:'y2axis'}, {yaxis:'y3axis'}], cursor:{show:true, zoom:true}, axesDefaults:{useSeriesColor:true} }); </code></pre> <p>And then an event handler is registered with the 'tabsshow' event fired by the jQUery UI Tab. In your case, you'll want to register a handler for the 'accordionchange' event fired by the jQuery UI Accordion widget upon completion of changing the accordion's state. Here's how you bind to the Tab's 'tabsshow' event for the above code example:</p> <pre><code>$('#tabs').bind('tabsshow', function(event, ui) { if (ui.index == 1 &amp;&amp; plot1._drawCount == 0) { plot1.replot(); } else if (ui.index == 2 &amp;&amp; plot2._drawCount == 0) { plot2.replot(); } }); </code></pre> <p>There's also a working example in the same ui.html file with an accordion. You can find the example in the latest release from bitbucket here: <a href="https://bitbucket.org/cleonello/jqplot/downloads/jquery.jqplot.1.0.0a_r701.zip" rel="nofollow">jqplot.1.0.0a_r701</a></p> <p>Also, make sure that you don't instantiate multiple jqPlot objects on the same div, or you'll have plots sitting on top of one another and overload the browser.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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