Commit af8ba272 authored by Evgeny's avatar Evgeny

Add bgcolor

parent 7faacd55
...@@ -106,7 +106,7 @@ module.exports = (grunt) -> ...@@ -106,7 +106,7 @@ module.exports = (grunt) ->
src: 'c3.css' src: 'c3.css'
dest: 'c3.min.css' dest: 'c3.min.css'
grunt.registerTask 'default', ['jshint', 'concat', 'test', 'posttest'] grunt.registerTask 'default', ['concat', 'test', 'posttest']
grunt.registerTask 'test', ['jasmine'] grunt.registerTask 'test', ['jasmine']
grunt.registerTask 'build', ['jshint', 'concat', 'posttest'] grunt.registerTask 'build', ['concat', 'posttest']
grunt.registerTask 'posttest', ['cssmin', 'uglify'] grunt.registerTask 'posttest', ['cssmin', 'uglify']
...@@ -43,3 +43,17 @@ c3_chart_fn.destroy = function () { ...@@ -43,3 +43,17 @@ c3_chart_fn.destroy = function () {
return null; return null;
}; };
c3_chart_fn.bgcolor = function(value) {
var $$ = this.internal;
var svg = $$.svg[0][0];
if (!arguments.length){
if(svg.style.backgroundColor){
return svg.style.backgroundColor;
} else {
return undefined;
}
} else {
svg.style.backgroundColor = value;
}
};
...@@ -278,7 +278,7 @@ c3_chart_internal_fn.rotateTickText = function (axis, transition, rotate) { ...@@ -278,7 +278,7 @@ c3_chart_internal_fn.rotateTickText = function (axis, transition, rotate) {
.attr('dx', this.xForRotatedTickText(rotate)); .attr('dx', this.xForRotatedTickText(rotate));
}; };
c3_chart_internal_fn.getMaxTickWidth = function (id, withoutRecompute) { c3_chart_internal_fn.getMaxTickWidth = function () {
return 10; return 10;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment