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