';
@@ -656,7 +684,7 @@ var Timeline = module.exports = function (options, callback) {
});
//let's do the compare date range
- this.points.forEach(function (point) {
+ this.points.forEach(function(point) {
if (point.series.options.compare) {
var formattedy = joola.common.formatMetric(point.point.y, point.series.options.metric);
comparehtml += '
';
@@ -676,35 +704,37 @@ var Timeline = module.exports = function (options, callback) {
if (!self.options.$container)
self.options.$container = $$(self.options.container);
self.chartOptions.chart.renderTo = self.options.$container.find('.thechart').get(0);
+ Highcharts.setOptions({
+ lang: {
+ thousandsSep: ','
+ }
+ });
self.chart = new Highcharts.Chart(self.chartOptions);
//self.chart.setSize( $$(self.chart.container).parent().width(), $$(self.chart.container).parent().height() );
self.chartDrawn = true;
if (self.options.canvas && !self.registered) {
self.registered = true;
- self.options.canvas.on('table-checkbox-clear', function (skipdraw) {
- self.clearAllFiltered(skipdraw, function () {
- });
+ self.options.canvas.on('table-checkbox-clear', function(skipdraw) {
+ self.clearAllFiltered(skipdraw, function() {});
});
- self.options.canvas.on('table-checkbox', function (point, filter, action) {
+ self.options.canvas.on('table-checkbox', function(point, filter, action) {
if (action === 'remove') {
var _queries = [];
- self.options.query.forEach(function (q, i) {
+ self.options.query.forEach(function(q, i) {
if (q.filter) {
- q.filter.forEach(function (f) {
+ q.filter.forEach(function(f) {
if (f[4] !== filter[0][4]) {
_queries.push(q);
}
});
- }
- else
+ } else
_queries.push(q);
});
self.options.query = _queries;
- }
- else {
- self.options.query.forEach(function (q) {
+ } else {
+ self.options.query.forEach(function(q) {
if (q.special)
return;
var _q = ce.cloneextend(q);
@@ -739,7 +769,7 @@ var Timeline = module.exports = function (options, callback) {
//we call the core initialize option
joola.viz.initialize(self, options || {});
- self.draw(null, function (err, ref) {
+ self.draw(null, function(err, ref) {
if (err)
return callback(err);
joola.viz.onscreen.push(self);
@@ -761,12 +791,14 @@ var Timeline = module.exports = function (options, callback) {
return self;
};
-joola.events.on('core.init.finish', function () {
+joola.events.on('core.init.finish', function() {
var found;
- if (typeof (jQuery) != 'undefined') {
- $.fn.Timeline = function (options, callback) {
+ if (typeof(jQuery) != 'undefined') {
+ $.fn.Timeline = function(options, callback) {
if (!options)
- options = {force: false};
+ options = {
+ force: false
+ };
else if (!options.hasOwnProperty('force'))
options.force = true;
var result = null;
@@ -775,7 +807,7 @@ joola.events.on('core.init.finish', function () {
if (options.force && uuid) {
var existing = null;
found = false;
- joola.viz.onscreen.forEach(function (viz) {
+ joola.viz.onscreen.forEach(function(viz) {
if (viz.uuid == uuid && !found) {
found = true;
existing = viz;
@@ -788,7 +820,7 @@ joola.events.on('core.init.finish', function () {
}
//create new
options.container = this.get(0);
- result = new joola.viz.Timeline(options, function (err, timeline) {
+ result = new joola.viz.Timeline(options, function(err, timeline) {
if (err)
throw err;
//timeline.draw(options, callback);
@@ -796,11 +828,10 @@ joola.events.on('core.init.finish', function () {
return callback(null, timeline);
}).options.$container;
- }
- else {
+ } else {
//return existing
found = false;
- joola.viz.onscreen.forEach(function (viz) {
+ joola.viz.onscreen.forEach(function(viz) {
if (viz.uuid == uuid && !found) {
found = true;
result = viz;