我在两种不同的情况下绘制图表。第一种情况是在加载期间,第二种情况是在 ajax 发布成功之后。在 onload 函数期间,在两种情况下都调用了相同的代码
,图表使用 jqplot 正确加载。但在发布错误后显示在客户端
Uncaught TypeError: Cannot read property 'BarRenderer' of undefined
脚本参考按顺序加载
<script src="../../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.jqplot.min.js" type="text/javascript"></script>
<script src="../../Scripts/jqplot.barRenderer.min.js" type="text/javascript"></script>
<script src="../../Scripts/jqplot.dateAxisRenderer.min.js" type="text/javascript">
<script src="../../Scripts/jqplot.categoryAxisRenderer.min.js" type="text/javascript"> </script>
<script src="../../Scripts/jqplot.pointLabels.min.js" type="text/javascript"></script>
<script src="../../Scripts/jqplot.canvasTextRenderer.min.js" type="text/javascript"></script>
<script src="../../Scripts/jqplot.canvasAxisTickRenderer.min.js" type="text/javascript"></script>
<link href="../../Content/jquery.jqplot.min.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jqplot.ohlcRenderer.min.js" type="text/javascript"></script>
<script src="../../Scripts/jqplot.highlighter.min.js" type="text/javascript"></script>