susielu / d3-legend

A reusable d3 legend component.
http://d3-legend.susielu.com/
Apache License 2.0
727 stars 104 forks source link

Interface LegendColor, issues with cellFilter method, argument type is missing #95

Open NmiDev opened 4 years ago

NmiDev commented 4 years ago

Hi Susie,

Thanks for your amazing job !

I did notice a type issue when trying to use cellFilter in legendColor. Looking at the interfaces, it seems to me that the cellFilter method miss one argument ?

types/d3-svg-legend.d.ts : line 12

export interface LegendColor {
    ...
    cellFilter(filter: () => boolean): LegendColor;
    ...
}

regarding the documentation : "This function is run as a filter function against the array of cells. If you have a function(d){ return true or false }, d has a .data and a .label property"

Thanks!