MCPcopy Create free account
hub / github.com/chartjs/Chart.js / borderProps

Function borderProps

src/controllers/controller.bar.ts:307–326  ·  view source on GitHub ↗
(properties: BarProperties)

Source from the content-addressed store, hash-verified

305}
306
307function borderProps(properties: BarProperties) {
308 let reverse: boolean, start: string, end: string, top: string, bottom: string;
309 if (properties.horizontal) {
310 reverse = properties.base > properties.x;
311 start = 'left';
312 end = 'right';
313 } else {
314 reverse = properties.base < properties.y;
315 start = 'bottom';
316 end = 'top';
317 }
318 if (reverse) {
319 top = 'end';
320 bottom = 'start';
321 } else {
322 top = 'start';
323 bottom = 'end';
324 }
325 return {start, end, reverse, top, bottom};
326}
327
328function setBorderSkipped(properties: BarProperties, options: BarEdgeOptions, stack: BarStack | undefined, index: number) {
329 let edge: string | boolean = options.borderSkipped;

Callers 1

setBorderSkippedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected