code: function splitInLines() {
              let legendEntries = svg.selectAll('.legend-entry');
              let numberOfEntries = legendEntries.size();
              let lineHeight = (chartHeight / 2) * 1.7;
              let newLine = svg.select('.legend-group')
                .append('g')
                  .classed('legend-line', true)
                  .attr('transform', `translate(0, ${lineHeight})`);
              let lastEntry = legendEntries.filter(`:nth-child(${numberOfEntries})`);
  
              lastEntry.attr('transform', `translate(${markerSize},0)`);
              newLine.append(() => lastEntry.node());
          }
docs: Simple method to move the last item of an overflowing legend into the next line
  @return {void}
  @private