2012-07-30 10:44:08 -07:00
|
|
|
/**
|
|
|
|
* @provides javelin-behavior-line-chart
|
|
|
|
* @requires javelin-behavior
|
|
|
|
* javelin-dom
|
2019-04-16 19:24:18 -07:00
|
|
|
* javelin-chart
|
2012-07-30 10:44:08 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
JX.behavior('line-chart', function(config) {
|
2019-04-16 19:24:18 -07:00
|
|
|
var chart_node = JX.$(config.chartNodeID);
|
2012-07-30 10:44:08 -07:00
|
|
|
|
2019-04-16 19:24:18 -07:00
|
|
|
var chart = new JX.Chart(chart_node);
|
2016-01-28 13:29:27 -08:00
|
|
|
|
2019-04-16 19:24:18 -07:00
|
|
|
function onresponse(r) {
|
|
|
|
chart.setData(r);
|
2012-07-30 10:44:08 -07:00
|
|
|
}
|
|
|
|
|
2019-04-16 19:24:18 -07:00
|
|
|
new JX.Request(config.dataURI, onresponse)
|
|
|
|
.send();
|
2012-07-30 10:44:08 -07:00
|
|
|
});
|