Skip to content

Commit

Permalink
Fix data.names API - #150
Browse files Browse the repository at this point in the history
  • Loading branch information
masayuki0812 committed May 3, 2014
1 parent 1c81c41 commit 85a5716
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions c3.js
Original file line number Diff line number Diff line change
Expand Up @@ -4130,9 +4130,7 @@
.attr("class", CLASS.legendItemEvent)
.style('fill-opacity', 0)
.attr('x', isLegendRight ? xForLegendRect : -200)
.attr('y', isLegendRight ? -200 : yForLegendRect)
.attr('width', function (id) { return widths[id]; })
.attr('height', function (id) { return heights[id]; });
.attr('y', isLegendRight ? -200 : yForLegendRect);
l.append('rect')
.attr("class", CLASS.legendItemTile)
.style("pointer-events", "none")
Expand All @@ -4153,6 +4151,8 @@
legend.selectAll('rect.' + CLASS.legendItemEvent)
.data(targetIds)
.transition().duration(withTransition ? 250 : 0)
.attr('width', function (id) { return widths[id]; })
.attr('height', function (id) { return heights[id]; })
.attr('x', xForLegendRect)
.attr('y', yForLegendRect);

Expand Down Expand Up @@ -4490,7 +4490,7 @@
Object.keys(names).forEach(function (id) {
__data_names[id] = names[id];
});
updateLegend(mapToIds(c3.data.targets), {withTransition: true});
redraw({withLegend: true});
return __data_names;
};
c3.data.colors = function (colors) {
Expand Down
Loading

0 comments on commit 85a5716

Please sign in to comment.