空仪表图? [英] Empty Flot Charts?

查看:93
本文介绍了空仪表图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行下面的代码,并使用Flot/jQuery获取一个空图表.理想情况下,我需要的是数据的条形图.我看着并没有高兴地看着它-有人有任何想法吗?

I'm running the code below and getting an empty chart using Flot/jQuery. Ideally what I am after is a bar chart of the data. I'm looked and looked at this with no joy - does anyone have any ideas?

<div id="user_breakdown_placeholder" style="width:300px;height:300px"></div>

<script>
    $(function () {
        var d = [["Unassigned", 310],["Maynard Schumm", 274]];
            var options = {};
        $.plot($("#user_breakdown_placeholder"), d, options);
    });

</script>

推荐答案

flot的当前版本(v.0.6)支持条形图.这是一个示例.在您的plot()函数中,您只需要输入:

The current version of flot (v. 0.6) supports bar charts. Here is an example. In your plot() function, you just have to put:

bars: { show: true}

这篇关于空仪表图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆