change legend items width calculation if items don't fit in one row
change legend items width calculation if items don't fit in one row

aburato/plotly.js,etpinard/plotly.js,plotly/plotly.js,iongroup/plotly.js,iongroup/plotly.js,aburato/plotly.js,etpinard/plotly.js,asolagmbh/plotly.js,plotly/plotly.js,plotly/plotly.js,iongroup/plotly.js,plotly/plotly.js,etpinard/plotly.js,asolagmbh/plotly.js,asolagmbh/plotly.js