(
relativePositions: number[],
vertical: boolean,
options: { size?: number; startPosition?: number; axes?: Axes } = {}
)
| 91 | } |
| 92 | |
| 93 | renderPlotLineModels( |
| 94 | relativePositions: number[], |
| 95 | vertical: boolean, |
| 96 | options: { size?: number; startPosition?: number; axes?: Axes } = {} |
| 97 | ): LineModel[] { |
| 98 | const { size, startPosition, axes } = options; |
| 99 | |
| 100 | const { lineColor: color, lineWidth, dashSegments } = this.theme[ |
| 101 | vertical ? 'vertical' : 'horizontal' |
| 102 | ] as Required<LineTheme>; |
| 103 | const tickInterval = (vertical ? axes?.xAxis : axes?.yAxis)?.tickInterval || 1; |
| 104 | |
| 105 | return relativePositions |
| 106 | .filter((_, idx) => !(idx % tickInterval)) |
| 107 | .map((position) => |
| 108 | this.makeLineModel( |
| 109 | vertical, |
| 110 | position, |
| 111 | { color, lineWidth, dashSegments }, |
| 112 | size ?? this.rect.width, |
| 113 | startPosition ?? 0 |
| 114 | ) |
| 115 | ); |
| 116 | } |
| 117 | |
| 118 | renderPlotsForCenterYAxis(axes: Axes): LineModel[] { |
| 119 | const { xAxisHalfSize, secondStartX, yAxisHeight } = axes.centerYAxis!; |
no test coverage detected