MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / getBoxWidth

Function getBoxWidth

static/plugins/chart.js/Chart.js:15243–15247  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

15241 * @return {number} width of the color box area
15242 */
15243function 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!

Callers 1

Chart.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected