From 3aae9ba4df64409d5ca64c849692c9cfb9bcfeb4 Mon Sep 17 00:00:00 2001 From: Masayuki Tanaka Date: Fri, 1 Aug 2014 21:54:42 +0100 Subject: [PATCH] Fix gauge --- src/arc.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/arc.js b/src/arc.js index f729a73..9ebfa74 100644 --- a/src/arc.js +++ b/src/arc.js @@ -211,11 +211,11 @@ c3_chart_internal_fn.updateTargetsForArc = function (targets) { }; c3_chart_internal_fn.initArc = function () { - var $$ = this, arcs; - arcs = $$.main.select('.' + CLASS[_chart]).append("g") + var $$ = this; + $$.arcs = $$.main.select('.' + CLASS[_chart]).append("g") .attr("class", CLASS[_chartArcs]) .attr("transform", $$.getTranslate('arc')); - arcs.append('text') + $$.arcs.append('text') .attr('class', CLASS[_chartArcsTitle]) .style("text-anchor", "middle") .text($$.getArcTitle()); @@ -323,7 +323,7 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf }; c3_chart_internal_fn.initGauge = function () { - var $$ = this, config = $$.config, arcs; + var $$ = this, config = $$.config, arcs = $$.arcs; if ($$.hasType('gauge')) { arcs.append('path') .attr("class", CLASS[_chartArcsBackground])