* Helper function to get the box width based on the usePointStyle option * @param {object} labelopts - the label options on the legend * @param {number} fontSize - the label font size * @return {number} width of the color box area
(labelOpts, fontSize)
| 15241 | * @return {number} width of the color box area |
| 15242 | */ |
| 15243 | function getBoxWidth(labelOpts, fontSize) { |
| 15244 | return labelOpts.usePointStyle && labelOpts.boxWidth > fontSize ? |
| 15245 | fontSize : |
| 15246 | labelOpts.boxWidth; |
| 15247 | } |
| 15248 | |
| 15249 | /** |
| 15250 | * IMPORTANT: this class is exposed publicly as Chart.Legend, backward compatibility required! |