将Peity.js和metricsgraphics.js一起使用时出错

时间:2015-08-10 11:39:29

标签: jquery metricsgraphicsjs

我尝试使用Peity.js绘制条形图,并且它有效。我尝试使用metricsgraphics.js绘制另一个图形,并且它有效。但是,当我将它们组合起来时,它会给我一个错误:

 Uncaught TypeError: Cannot read property 'DEFAULTS' of undefined  (metricsgraphics.min.js:2)

请检查图像。 Error in the console

你能帮我解决这个问题吗?

这是我的图表的度量图表代码。当我添加它时,我收到错误。

grapghData=
[
      {  "date": "2014-04-23",  "value": 115877608   },
       {  "date": "2014-04-24", "value": 132088857  },
        { "date": "2014-04-25","value": 112071353  },
        { "date": "2014-04-26", "value": 81790062 },
        { "date": "2014-04-27", "value": 105003761 },
        { "date": "2014-04-28",  "value": 100457727 },
        { "date": "2014-04-29", "value": 118253926 },
        { "date": "2014-04-30", "value": 67956992  }
    ];

grapghData = MG.convert.date(grapghData, 'date');
    MG.data_graphic({
        title: "Line Chart",
        description: "This is a simple line chart. You can remove the area portion by adding area: false to the arguments list.",
        data: grapghData,
        width: 600,
        height: 200,
        right: 40,
        target: document.getElementById('fake_users1'),
        x_accessor: 'date',
        y_accessor: 'value'
    });

0 个答案:

没有答案