diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-02 19:24:45 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-02 19:24:45 +0200 |
commit | 0d8bba263dc195147d6fdb09662e7926f0a58b3e (patch) | |
tree | 4c570b4376c323e585120e7695b8715be7aa8881 /web/nms.gathering.org/speedometer/c3-master/src/api.grid.js | |
parent | e4354b47bd8891c5b1ee591fdf74b3ca67eee461 (diff) |
Bump lots of changes
Diffstat (limited to 'web/nms.gathering.org/speedometer/c3-master/src/api.grid.js')
-rw-r--r-- | web/nms.gathering.org/speedometer/c3-master/src/api.grid.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/web/nms.gathering.org/speedometer/c3-master/src/api.grid.js b/web/nms.gathering.org/speedometer/c3-master/src/api.grid.js new file mode 100644 index 0000000..038aa6b --- /dev/null +++ b/web/nms.gathering.org/speedometer/c3-master/src/api.grid.js @@ -0,0 +1,31 @@ +c3_chart_fn.xgrids = function (grids) { + var $$ = this.internal, config = $$.config; + if (! grids) { return config.grid_x_lines; } + config.grid_x_lines = grids; + $$.redrawWithoutRescale(); + return config.grid_x_lines; +}; +c3_chart_fn.xgrids.add = function (grids) { + var $$ = this.internal; + return this.xgrids($$.config.grid_x_lines.concat(grids ? grids : [])); +}; +c3_chart_fn.xgrids.remove = function (params) { // TODO: multiple + var $$ = this.internal; + $$.removeGridLines(params, true); +}; + +c3_chart_fn.ygrids = function (grids) { + var $$ = this.internal, config = $$.config; + if (! grids) { return config.grid_y_lines; } + config.grid_y_lines = grids; + $$.redrawWithoutRescale(); + return config.grid_y_lines; +}; +c3_chart_fn.ygrids.add = function (grids) { + var $$ = this.internal; + return this.ygrids($$.config.grid_y_lines.concat(grids ? grids : [])); +}; +c3_chart_fn.ygrids.remove = function (params) { // TODO: multiple + var $$ = this.internal; + $$.removeGridLines(params, false); +}; |