mirror of https://github.com/masayuki0812/c3.git
Quite good looking graph derived from d3.js
http://c3js.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
33 lines
1.1 KiB
import { Chart } from './core'; |
|
|
|
Chart.prototype.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; |
|
}; |
|
Chart.prototype.xgrids.add = function (grids) { |
|
var $$ = this.internal; |
|
return this.xgrids($$.config.grid_x_lines.concat(grids ? grids : [])); |
|
}; |
|
Chart.prototype.xgrids.remove = function (params) { // TODO: multiple |
|
var $$ = this.internal; |
|
$$.removeGridLines(params, true); |
|
}; |
|
|
|
Chart.prototype.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; |
|
}; |
|
Chart.prototype.ygrids.add = function (grids) { |
|
var $$ = this.internal; |
|
return this.ygrids($$.config.grid_y_lines.concat(grids ? grids : [])); |
|
}; |
|
Chart.prototype.ygrids.remove = function (params) { // TODO: multiple |
|
var $$ = this.internal; |
|
$$.removeGridLines(params, false); |
|
};
|
|
|