@@ -32811,7 +32811,7 @@ exports.svgAttrs = {
3281132811var Plotly = require('./plotly');
3281232812
3281332813// package version injected by `npm run preprocess`
32814- exports.version = '1.33.1-ion35 ';
32814+ exports.version = '1.33.1-ion36 ';
3281532815
3281632816// inject promise polyfill
3281732817require('es6-promise').polyfill();
@@ -38109,8 +38109,9 @@ function buildSVGText(containerNode, str, gd, IONFormat) {
3810938109
3811038110 // In case ION new line logic applies to the legend labels
3811138111 var numCharsInLabel = 17;
38112- if (gd._fullLayout._hasPie && gd._fullLayout.legend && gd._fullLayout.legend.orientation === 'v' && gd._fullLayout.width > 220 && gd.data.length === 1) {
38113- numCharsInLabel = 5 + Math.ceil((gd._fullLayout.width - 220)/25);
38112+
38113+ if (gd._fullLayout._hasPie && gd._fullLayout.legend && gd._fullLayout.legend.orientation === 'v' && gd._fullLayout.width > 170 && gd.data.length === 1) {
38114+ numCharsInLabel = 5 + Math.floor((gd._fullLayout.width - 170)/22);
3811438115 }
3811538116
3811638117 // In case BR is already used for hovertooltip custom formatting
@@ -38129,7 +38130,7 @@ function buildSVGText(containerNode, str, gd, IONFormat) {
3812938130 } else {
3813038131 strION = strION.substr(0, upToPos) + "<br>" + strION.substr(upToPos);
3813138132 }
38132- if (strION.length > numCharsInLabel * 2) {
38133+ if (strION.length - 4 > numCharsInLabel * 2) {
3813338134 strION = strION.substr(0, (numCharsInLabel * 2) + 4 - 3 ) + "...";
3813438135 }
3813538136 }
0 commit comments