开发者

jqplot "no data to plot"

开发者 https://www.devze.com 2023-03-23 06:24 出处:网络
http://www.jqplot.com <script src=\"/Scripts/jquery.jqplot.js\" type=\"text/javascript\"></script>

http://www.jqplot.com

jqplot "no data to plot"

<script src="/Scripts/jquery.jqplot.js" type="text/javascript"></script>
<script src="/Scripts/jqplot.barRenderer.js" type="text/javascript"></script>
<script src="/Scripts/jqplot.categoryAxisRenderer.js" type="text/javascript"></script>
<script src="/Scripts/jqplot.pointLabels.js" type="text/javascript"></script>


// categories is the data on the top of the scree开发者_JS百科nshot.
// hours is the data on the bottom of screenshot

    $.jqplot('timeOffGraph', hours, {
                    seriesDefaults: {
                        renderer: $.jqplot.BarRenderer,
                        rendererOptions: { fillToZero: true },
                        pointLabels: { show: true }
                    },
                    axes: {
                        xaxis: {
                            renderer: $.jqplot.CategoryAxisRenderer,
                            ticks: categories
                        },
                        yaxis: {
                            tickOptions: { formatString: '%d' },
                            autoscale: true,
                            min: 0,
                            max: 10000
                        }
                    }
                });

I get "DataError: no data to plot"


I think you need to put it in one more array $.jqplot('timeOffGraph', [hours], {

0

精彩评论

暂无评论...
验证码 换一张
取 消