UNPKG

c3

Version:

D3-based reusable chart library

14 lines (12 loc) 408 B
import { Chart } from './core' Chart.prototype.legend = function() {} Chart.prototype.legend.show = function(targetIds) { var $$ = this.internal $$.showLegend($$.mapToTargetIds(targetIds)) $$.updateAndRedraw({ withLegend: true }) } Chart.prototype.legend.hide = function(targetIds) { var $$ = this.internal $$.hideLegend($$.mapToTargetIds(targetIds)) $$.updateAndRedraw({ withLegend: false }) }