Browse Source

Fix mapToTargetIds

pull/1177/merge
Masayuki Tanaka 10 years ago
parent
commit
dc33ef14a8
  1. 16
      c3.js
  2. 2
      c3.min.js
  3. 2
      src/legend.js

16
c3.js

@ -4148,20 +4148,24 @@
}
})
.on('mouseover', function (id) {
$$.d3.select(this).classed(CLASS.legendItemFocused, true);
if (!$$.transiting && $$.isTargetToShow(id)) {
$$.api.focus(id);
}
if (config.legend_item_onmouseover) {
config.legend_item_onmouseover.call($$, id);
}
else {
$$.d3.select(this).classed(CLASS.legendItemFocused, true);
if (!$$.transiting && $$.isTargetToShow(id)) {
$$.api.focus(id);
}
}
})
.on('mouseout', function (id) {
$$.d3.select(this).classed(CLASS.legendItemFocused, false);
$$.api.revert();
if (config.legend_item_onmouseout) {
config.legend_item_onmouseout.call($$, id);
}
else {
$$.d3.select(this).classed(CLASS.legendItemFocused, false);
$$.api.revert();
}
});
l.append('text')
.text(function (id) { return isDefined(config.data_names[id]) ? config.data_names[id] : id; })

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
src/legend.js

@ -256,7 +256,7 @@ c3_chart_internal_fn.updateLegend = function (targetIds, options, transitions) {
}
else {
$$.d3.select(this).classed(CLASS.legendItemFocused, false);
$$.api.revert();
$$.api.revert();
}
});
l.append('text')

Loading…
Cancel
Save