我正在使用jqplot在手风琴中显示图形。 http://www.jqplot.com/tests/UI.phpjqplot在一个标签内的手风琴不起作用
当我只显示没有被分割成各种手风琴标题的图表时,它完美地工作。当我开始把图表到各种手风琴头我开始JavaScript的错误,当我鼠标悬停在图表应显示:
Error: plot.plugins.pieRenderer is undefined
Error: plot.plugins.barRenderer is undefined
<script type="text/javascript">
$(function() {
$("#RTD_BreakGroups").accordion({
autoHeight: false,
navigation: true,
collapsible: true,
active: false
});
$("#RTD_BreakGroups").bind('accordionchange', function(event, ui) {
var index = $(this).find("h3").index(ui.newHeader[0]);
switch (index)
{
case 1:
goodbadplot.replot();
percentdiffplot.replot();
break;
case 10:
Engineergoodplot.replot();
Engineerbadplot.replot();
break;
}
});
});
<div id="RTD_BreakGroups">
<h3><a href="#">RTD Overview</a></h3>
<div>
<div id="GoodVsBad" data-height="450" data-width="450" style="height:450px;width:450px;"></div>
<div id="GoodVsBadThreshold" data-height="250" data-width="700" style="height:250px;width:700px;"></div>
<style type="text/css">
#GoodVsBadThreshold .jqplot-meterGauge-tick, #GoodVsBadThreshold .jqplot-meterGauge-label
{
font-size: 10pt;
}
</style>
</div>
<h3><a href="#">Engineer Overview</a></h3>
<div>
This grouping shows how RTD has been behaving if the player is a engineer.
<div id="EngineerGoodRolls" data-height="450" data-width="1024" style="height:450px;width:1024px;"></div>
<div id="EngineerBadRolls" data-height="450" data-width="1024" style="height:450px;width:1024px;"></div>
</div>
</div>
就像我上面所说的那样,这些图表不会在手风琴中加载,但会在手风琴中抛出关于未定义渲染器的错误。任何人都可以看到我做错了什么吗?
包括相关代码在你的回应! – 2013-01-29 20:56:56