From b77458480c3964251ed24bee1c3fab19128b348c Mon Sep 17 00:00:00 2001 From: Daniele Piccone Date: Thu, 13 Aug 2015 13:09:51 +0200 Subject: [PATCH] Fixing gruntfile and renamed to svg_classname --- Gruntfile.coffee | 3 +-- spec/core-spec.js | 2 +- src/core.js | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 8dbaa38..a783980 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -89,8 +89,7 @@ module.exports = (grunt) -> c3: src: 'c3.js' options: - #specs: 'spec/*-spec.js' - specs: 'spec/core-spec.js' + specs: 'spec/*-spec.js' helpers: 'spec/*-helper.js' styles: 'c3.css' vendor: 'https://rawgit.com/mbostock/d3/v3.5.0/d3.min.js' diff --git a/spec/core-spec.js b/spec/core-spec.js index 03fe492..18cffdb 100644 --- a/spec/core-spec.js +++ b/spec/core-spec.js @@ -4,7 +4,7 @@ describe('c3 chart', function () { var chart; var args = { - classname: 'customclass', + svg_classname: 'customclass', data: { columns: [ ['data1', 30, 200, 100, 400, 150, 250], diff --git a/src/core.js b/src/core.js index 14a8666..4dad60d 100644 --- a/src/core.js +++ b/src/core.js @@ -252,8 +252,8 @@ c3_chart_internal_fn.initWithData = function (data) { .on('mouseenter', function () { return config.onmouseover.call($$); }) .on('mouseleave', function () { return config.onmouseout.call($$); }); - if ($$.config.classname) { - $$.svg.attr('class', $$.config.classname); + if ($$.config.svg_classname) { + $$.svg.attr('class', $$.config.svg_classname); } // Define defs