Browse Source

Proposed solution for issue #1736. Adding public chart api as context of the color callback

pull/1737/head
Piotr Steininger 9 years ago
parent
commit
0819fe2cd6
  1. 2
      c3.js
  2. 12
      c3.min.js
  3. 2
      src/color.js

2
c3.js

@ -5801,7 +5801,7 @@
color = pattern[ids.indexOf(id) % pattern.length];
colors[id] = color;
}
return callback instanceof Function ? callback(color, d) : color;
return callback instanceof Function ? callback.call($$.api,color, d) : color;
};
};
c3_chart_internal_fn.generateLevelColor = function () {

12
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/color.js

@ -22,7 +22,7 @@ c3_chart_internal_fn.generateColor = function () {
color = pattern[ids.indexOf(id) % pattern.length];
colors[id] = color;
}
return callback instanceof Function ? callback(color, d) : color;
return callback instanceof Function ? callback.call($$.api,color, d) : color;
};
};
c3_chart_internal_fn.generateLevelColor = function () {

Loading…
Cancel
Save