in Hands-on lab/lab-files/starter-project/NorthwindMVC/wwwroot/lib/Chart.js/chart.js [9426:9474]
x: horizontal ? (x + base) / 2 : x,
y: horizontal ? y : (y + base) / 2
};
}
getRange(axis) {
return axis === 'x' ? this.width / 2 : this.height / 2;
}
}
BarElement.id = 'bar';
BarElement.defaults = {
borderSkipped: 'start',
borderWidth: 0,
borderRadius: 0,
enableBorderRadius: true,
pointStyle: undefined
};
BarElement.defaultRoutes = {
backgroundColor: 'backgroundColor',
borderColor: 'borderColor'
};
var elements = /*#__PURE__*/Object.freeze({
__proto__: null,
ArcElement: ArcElement,
LineElement: LineElement,
PointElement: PointElement,
BarElement: BarElement
});
function lttbDecimation(data, start, count, availableWidth, options) {
const samples = options.samples || availableWidth;
if (samples >= count) {
return data.slice(start, start + count);
}
const decimated = [];
const bucketWidth = (count - 2) / (samples - 2);
let sampledIndex = 0;
const endIndex = start + count - 1;
let a = start;
let i, maxAreaPoint, maxArea, area, nextA;
decimated[sampledIndex++] = data[a];
for (i = 0; i < samples - 2; i++) {
let avgX = 0;
let avgY = 0;
let j;
const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;
const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;
const avgRangeLength = avgRangeEnd - avgRangeStart;
for (j = avgRangeStart; j < avgRangeEnd; j++) {