Browse Source

Reflect PR #599

pull/631/head
Masayuki Tanaka 10 years ago
parent
commit
de17e33ea5
  1. 2
      c3.min.js
  2. 5
      src/arc.js

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

5
src/arc.js

@ -108,14 +108,15 @@ c3_chart_internal_fn.convertToArcData = function (d) {
c3_chart_internal_fn.textForArcLabel = function (d) { c3_chart_internal_fn.textForArcLabel = function (d) {
var $$ = this, var $$ = this,
updated, value, ratio, format; updated, value, ratio, id, format;
if (! $$.shouldShowArcLabel()) { return ""; } if (! $$.shouldShowArcLabel()) { return ""; }
updated = $$.updateAngle(d); updated = $$.updateAngle(d);
value = updated ? updated.value : null; value = updated ? updated.value : null;
ratio = $$.getArcRatio(updated); ratio = $$.getArcRatio(updated);
id = d.data.id;
if (! $$.hasType('gauge') && ! $$.meetsArcLabelThreshold(ratio)) { return ""; } if (! $$.hasType('gauge') && ! $$.meetsArcLabelThreshold(ratio)) { return ""; }
format = $$.getArcLabelFormat(); format = $$.getArcLabelFormat();
return format ? format(value, ratio) : $$.defaultArcValueFormat(value, ratio); return format ? format(value, ratio, id) : $$.defaultArcValueFormat(value, ratio);
}; };
c3_chart_internal_fn.expandArc = function (targetIds) { c3_chart_internal_fn.expandArc = function (targetIds) {

Loading…
Cancel
Save