Browse Source

Fixing gruntfile and renamed to svg_classname

pull/1289/head
Daniele Piccone 10 years ago
parent
commit
b77458480c
  1. 3
      Gruntfile.coffee
  2. 2
      spec/core-spec.js
  3. 4
      src/core.js

3
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'

2
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],

4
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

Loading…
Cancel
Save