diff --git a/spec/arc-spec.js b/spec/arc-spec.js index 1c00224..f306548 100644 --- a/spec/arc-spec.js +++ b/spec/arc-spec.js @@ -212,7 +212,7 @@ describe('c3 chart arc', function () { values: [30, 80, 95] } } - } + }; }); var arcColor = ['#60b044', '#f6c600', '#f97600', '#ff0000']; @@ -220,7 +220,7 @@ describe('c3 chart arc', function () { it('each data_column should have one arc', function () { chart.internal.main.selectAll('.c3-chart-arc .c3-arc').each(function (d, i) { expect(d3.select(this).classed('c3-chart-data-' + args.data.columns[i][0])).toBeTruthy(); - }) + }); }); it('each arc should have the color from color_pattern if color_treshold is given ', function () { @@ -234,11 +234,11 @@ describe('c3 chart arc', function () { it('each data_column should have one background', function () { chart.internal.main.selectAll('.c3-chart-arcs path.c3-chart-arcs-background').each(function (d, i) { expect(d3.select(this).classed('c3-chart-arcs-background-'+ i)).toBeTruthy(); - }) + }); }); it('each background should have tbe same color', function () { - chart.internal.main.selectAll('.c3-chart-arcs path.c3-chart-arcs-background').each(function (d, i) { + chart.internal.main.selectAll('.c3-chart-arcs path.c3-chart-arcs-background').each(function () { expect(d3.select(this).style('fill')).toBe('#e0e0e0'); }); }); @@ -248,11 +248,11 @@ describe('c3 chart arc', function () { it('each data_column should have a label', function () { chart.internal.main.selectAll('.c3-chart-arc .c3-gauge-value').each(function (d, i) { expect(d3.select(this).text()).toBe(args.data.columns[i][1]); - }) + }); }); it('each label should have the same color', function () { - chart.internal.main.selectAll('.c3-chart-arc .c3-gauge-value').each(function (d, i) { + chart.internal.main.selectAll('.c3-chart-arc .c3-gauge-value').each(function () { expect(d3.select(this).style('fill')).toBe('#000'); }); @@ -276,7 +276,7 @@ describe('c3 chart arc', function () { it('each data_column should have a labelline', function () { chart.internal.main.selectAll('.c3-chart-arc .c3-arc-label-line').each(function (d, i) { expect(d3.select(this).classed('c3-data-' + args.data.columns[i][0])).toBeTruthy(); - }) + }); }); it('each labelline should have the color from color_pattern if color_treshold is given', function () { diff --git a/spec/legend-spec.js b/spec/legend-spec.js index 06b5b20..ff67cb1 100644 --- a/spec/legend-spec.js +++ b/spec/legend-spec.js @@ -292,7 +292,7 @@ describe('c3 chart legend', function () { values: [30, 80, 95] } } - } + }; }); // espacially for gauges with multiple arcs to have the same coloring between legend tiles, tooltip tiles and arc @@ -305,7 +305,7 @@ describe('c3 chart legend', function () { expect(tileColor[1]).toBe('rgb(246, 198, 0)'); expect(tileColor[2]).toBe('rgb(249, 118, 0)'); expect(tileColor[3]).toBe('rgb(255, 0, 0)'); - }) + }); }); describe('legend item tile coloring without color_treshold', function () { @@ -324,7 +324,7 @@ describe('c3 chart legend', function () { } }, type: 'gauge' - } + }; }); it('selects the color from data_colors, data_color or default', function () { @@ -336,6 +336,6 @@ describe('c3 chart legend', function () { expect(tileColor[1]).toBe('rgb(31, 119, 180)'); expect(tileColor[2]).toBe('rgb(255, 127, 14)'); expect(tileColor[3]).toBe('rgb(139, 0, 139)'); - }) + }); }); }); diff --git a/src/arc.js b/src/arc.js index cb79bfb..322262c 100644 --- a/src/arc.js +++ b/src/arc.js @@ -105,7 +105,7 @@ c3_chart_internal_fn.getArc = function (d, withoutUpdate, force) { c3_chart_internal_fn.transformForArcLabel = function (d) { - var $$ = this, + var $$ = this, config = $$.config, updated = $$.updateAngle(d), c, x, y, h, ratio, translate = "", hasGauge = $$.hasType('gauge'); if (updated && !hasGauge) { c = this.svgArc.centroid(updated); @@ -461,7 +461,7 @@ c3_chart_internal_fn.redrawArc = function (duration, durationForExit, withTransf backgroundArc = $$.arcs.select('g.' + CLASS.chartArcsBackground).selectAll('path.' + CLASS.chartArcsBackground).data($$.data.targets); backgroundArc.enter().append("path"); backgroundArc - .attr("class", function (d, i) { return CLASS.chartArcsBackground + ' ' + CLASS.chartArcsBackground +'-'+ i}) + .attr("class", function (d, i) { return CLASS.chartArcsBackground + ' ' + CLASS.chartArcsBackground +'-'+ i; }) .attr("d", function (d1) { if ($$.hiddenTargetIds.indexOf(d1.id) >= 0) { return "M 0 0"; }