(
dataInterval: number[],
dataExtent: number[],
handleEnds: number[],
forceState: ContinuousModel['stateList'][number]
)
| 501 | } |
| 502 | |
| 503 | private _createBarVisual( |
| 504 | dataInterval: number[], |
| 505 | dataExtent: number[], |
| 506 | handleEnds: number[], |
| 507 | forceState: ContinuousModel['stateList'][number] |
| 508 | ): BarVisual { |
| 509 | const opts = { |
| 510 | forceState: forceState, |
| 511 | convertOpacityToAlpha: true |
| 512 | }; |
| 513 | const colorStops = this._makeColorGradient(dataInterval, opts); |
| 514 | |
| 515 | const symbolSizes = [ |
| 516 | this.getControllerVisual(dataInterval[0], 'symbolSize', opts) as number, |
| 517 | this.getControllerVisual(dataInterval[1], 'symbolSize', opts) as number |
| 518 | ]; |
| 519 | const barPoints = this._createBarPoints(handleEnds, symbolSizes); |
| 520 | |
| 521 | return { |
| 522 | barColor: new LinearGradient(0, 0, 0, 1, colorStops), |
| 523 | barPoints: barPoints, |
| 524 | handlesColor: [ |
| 525 | colorStops[0].color, |
| 526 | colorStops[colorStops.length - 1].color |
| 527 | ] |
| 528 | }; |
| 529 | } |
| 530 | |
| 531 | private _makeColorGradient( |
| 532 | dataInterval: number[], |
no test coverage detected