c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.33k stars 1.39k forks source link

Apply Padding at yForLegendRect #2722

Open tjohannto opened 4 years ago

tjohannto commented 4 years ago

Currently there is a fixed value used for yForLegendRect:

yForLegendRect = function yForLegendRect(id, i) {
      return yForLegend(id, i) - 5;
    };

But the paddingTop can be changed and should be used here imho:

yForLegendRect = function yForLegendRect(id, i) {
      return yForLegend(id, i) - (paddingTop + 1);
};

Am I right?