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

Function alignmentOffset

static/plugins/chart.js/Chart.bundle.js:20176–20185  ·  view source on GitHub ↗
(dimension, blockSize)

Source from the content-addressed store, hash-verified

20174 };
20175
20176 var alignmentOffset = function(dimension, blockSize) {
20177 switch (opts.align) {
20178 case 'start':
20179 return labelOpts.padding;
20180 case 'end':
20181 return dimension - blockSize;
20182 default: // center
20183 return (dimension - blockSize + labelOpts.padding) / 2;
20184 }
20185 };
20186
20187 // Horizontal
20188 var isHorizontal = me.isHorizontal();

Callers 1

Chart.bundle.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected