如何在混合应用程序中创建图形

时间:2014-07-11 12:26:31

标签: javascript angularjs hybrid

我是混合动力技术的新手。目前我正在研究离子框架,角度js和手机间隙,我的问题是如何创建图表。 任何人都可以建议我如何包装图(线,饼图)

此致 Deepti

1 个答案:

答案 0 :(得分:0)

您可以尝试使用ChartJS

他们有响应式图表,数据结构可以很容易地与工厂或服务一起使用

数据结构

var data = {
    labels: ["January", "February", "March", "April", "May", "June", "July"],
    datasets: [
        {
            label: "My First dataset",
            fillColor: "rgba(220,220,220,0.5)",
            strokeColor: "rgba(220,220,220,0.8)",
            highlightFill: "rgba(220,220,220,0.75)",
            highlightStroke: "rgba(220,220,220,1)",
            data: [65, 59, 80, 81, 56, 55, 40]
        },
        {
            label: "My Second dataset",
            fillColor: "rgba(151,187,205,0.5)",
            strokeColor: "rgba(151,187,205,0.8)",
            highlightFill: "rgba(151,187,205,0.75)",
            highlightStroke: "rgba(151,187,205,1)",
            data: [28, 48, 40, 19, 86, 27, 90]
        }
    ]
};