- var CustomBarsHandler = Dygraph.DataHandler();
- CustomBarsHandler.prototype = Dygraph.DataHandlers.createHandler("bars");
- Dygraph.DataHandlers.registerHandler("bars-custom", CustomBarsHandler);
- // customBars
- CustomBarsHandler.prototype.extractSeries = function(rawData, i, options) {
- // TODO(danvk): pre-allocate series here.
- var series = [];
- var x, y, point;
- var logScale = options.get('logscale');
- for ( var j = 0; j < rawData.length; j++) {
- x = rawData[j][0];
- point = rawData[j][i];
- if (logScale && point !== null) {
- // On the log scale, points less than zero do not exist.
- // This will create a gap in the chart.
- if (point[0] <= 0 || point[1] <= 0 || point[2] <= 0) {
- point = null;
- }
+/*global Dygraph:false */
+"use strict";
+
+Dygraph.DataHandlers.CustomBarsHandler = Dygraph.DataHandler();
+var CustomBarsHandler = Dygraph.DataHandlers.CustomBarsHandler;
+CustomBarsHandler.prototype = new Dygraph.DataHandlers.BarsHandler();
+
+// customBars
+CustomBarsHandler.prototype.extractSeries = function(rawData, i, options) {
+ // TODO(danvk): pre-allocate series here.
+ var series = [];
+ var x, y, point;
+ var logScale = options.get('logscale');
+ for ( var j = 0; j < rawData.length; j++) {
+ x = rawData[j][0];
+ point = rawData[j][i];
+ if (logScale && point !== null) {
+ // On the log scale, points less than zero do not exist.
+ // This will create a gap in the chart.
+ if (point[0] <= 0 || point[1] <= 0 || point[2] <= 0) {
+ point = null;