|
|
@ -307,7 +307,9 @@ c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) { |
|
|
|
tiles = $$.legend.selectAll('line.' + CLASS.legendItemTile) |
|
|
|
tiles = $$.legend.selectAll('line.' + CLASS.legendItemTile) |
|
|
|
.data(targetIds); |
|
|
|
.data(targetIds); |
|
|
|
(withTransition ? tiles.transition() : tiles) |
|
|
|
(withTransition ? tiles.transition() : tiles) |
|
|
|
.style('stroke', $$.color) |
|
|
|
.style('stroke', $$.levelColor ? function(id) { |
|
|
|
|
|
|
|
return $$.levelColor($$.cache[id].values[0].value); |
|
|
|
|
|
|
|
} : $$.color) |
|
|
|
.attr('x1', x1ForLegendTile) |
|
|
|
.attr('x1', x1ForLegendTile) |
|
|
|
.attr('y1', yForLegendTile) |
|
|
|
.attr('y1', yForLegendTile) |
|
|
|
.attr('x2', x2ForLegendTile) |
|
|
|
.attr('x2', x2ForLegendTile) |
|
|
|