Interface LegendLabelsCallback


  • public interface LegendLabelsCallback
    Generates legend items for each thing in the legend.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • generateLegendLabels

        List<LegendLabelItem> generateLegendLabels​(IsChart chart,
                                                   List<LegendLabelItem> defaultLabels)
        Generates legend items for each thing in the legend. Default implementation returns the text + styling for the color box.
        Parameters:
        chart - chart instance
        defaultLabels - list of labels created by CHART.JS using the out of the box generate labels callback.
        Returns:
        a list of legend items. if null, uses the default implementation