MCPcopy Index your code
hub / github.com/apache/echarts / createMatrixLine

Function createMatrixLine

src/component/matrix/MatrixView.ts:440–456  ·  view source on GitHub ↗
(shape: Omit<LineShape, 'percent'>, style: LineStyleProps, z2: number)

Source from the content-addressed store, hash-verified

438}
439
440function createMatrixLine(shape: Omit<LineShape, 'percent'>, style: LineStyleProps, z2: number): Line {
441 const lineWidth = style.lineWidth;
442 if (lineWidth) {
443 if (round(shape.x1 * 2) === round(shape.x2 * 2)) {
444 shape.x1 = shape.x2 = subPixelOptimize(shape.x1, lineWidth, true);
445 }
446 if (round(shape.y1 * 2) === round(shape.y2 * 2)) {
447 shape.y1 = shape.y2 = subPixelOptimize(shape.y1, lineWidth, true);
448 }
449 }
450 return new Line({
451 shape,
452 style,
453 silent: true,
454 z2,
455 });
456}
457
458export default MatrixView;

Callers 1

renderMethod · 0.85

Calls 1

roundFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…