Browse Source

Focused radius now can accept a function (#1704)

It fixes #1571
pull/2152/head
Anthony Pessy 7 years ago committed by Yoshiya Hinosawa
parent
commit
b7a2e6cd9e
  1. 6
      src/shape.line.js

6
src/shape.line.js

@ -372,7 +372,11 @@ c3_chart_internal_fn.pointR = function (d) {
};
c3_chart_internal_fn.pointExpandedR = function (d) {
var $$ = this, config = $$.config;
return config.point_focus_expand_enabled ? (config.point_focus_expand_r ? config.point_focus_expand_r : $$.pointR(d) * 1.75) : $$.pointR(d);
if (config.point_focus_expand_enabled) {
return isFunction(config.point_focus_expand_r) ? config.point_focus_expand_r(d) : ((config.point_focus_expand_r) ? config.point_focus_expand_r : $$.pointR(d) * 1.75);
} else {
return $$.pointR(d);
}
};
c3_chart_internal_fn.pointSelectR = function (d) {
var $$ = this, config = $$.config;

Loading…
Cancel
Save