import layouts from '../core/core.layouts';
import {drawPoint} from '../helpers/helpers.canvas';
import {
- callback as call, merge, valueOrDefault, isNullOrUndef, toFont,
+ callback as call, merge, valueOrDefault, isNullOrUndef, toFont, isObject,
toPadding, getRtlAdapter, overrideTextDirection, restoreTextDirection,
INFINITY
} from '../helpers/index';
return chart._getSortedDatasetMetas().map((meta) => {
const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);
+ const borderWidth = isObject(style.borderWidth) ? (valueOrDefault(style.borderWidth.top, 0) + valueOrDefault(style.borderWidth.left, 0) + valueOrDefault(style.borderWidth.bottom, 0) + valueOrDefault(style.borderWidth.right, 0)) / 4 : style.borderWidth;
return {
text: datasets[meta.index].label,
lineDash: style.borderDash,
lineDashOffset: style.borderDashOffset,
lineJoin: style.borderJoinStyle,
- lineWidth: style.borderWidth,
+ lineWidth: borderWidth,
strokeStyle: style.borderColor,
pointStyle: overrideStyle || style.pointStyle,
rotation: style.rotation,