(boxWidth, labelFont, ctx, legendItem, _itemHeight)
| 553 | } |
| 554 | |
| 555 | function calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight) { |
| 556 | const itemWidth = calculateItemWidth(legendItem, boxWidth, labelFont, ctx); |
| 557 | const itemHeight = calculateItemHeight(_itemHeight, legendItem, labelFont.lineHeight); |
| 558 | return {itemWidth, itemHeight}; |
| 559 | } |
| 560 | |
| 561 | function calculateItemWidth(legendItem, boxWidth, labelFont, ctx) { |
| 562 | let legendItemText = legendItem.text; |
no test coverage detected