humangeo / leaflet-dvf

Leaflet Data Visualization Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question on _getLegend in ChartDataLayer

rickj33 opened this issue · comments

Sorry for posting as an Issue, but I did not see any other way of asking a general question, If there is such a way, could you point me to it, and i will use it from now on.

In the method _getLegend what is the purpose of the legend variable?

_getLegend: function (legendOptions) {
        var dataLayerLegend = L.DataLayer.prototype._getLegend.call(this, legendOptions);
        var legend = new L.CategoryLegend(this.options.chartOptions);

        legendOptions = legendOptions || this.options.legendOptions;

        return legend.generate(legendOptions);
    }

rick

Disregard the question, I missed the obvious.

@rickj33 No problem. This does beg the question of the purpose of the dataLayerLegend variable, though - which seems to serve no purpose. Thanks for posting the question. Creating a new issue to ask a question works for me, btw.