1 | import { jsx } from '@antv/f-engine';
|
2 | export default (function (props, context) {
|
3 | var coord = props.coord,
|
4 | range = props.range,
|
5 | position = props.position,
|
6 | layout = props.layout;
|
7 | var top = coord.top,
|
8 | height = coord.height;
|
9 | var left = layout.left,
|
10 | width = layout.width;
|
11 | var _a = (range === null || range === void 0 ? void 0 : range.y) || (range === null || range === void 0 ? void 0 : range.x),
|
12 | start = _a[0],
|
13 | end = _a[1];
|
14 | var barTop = height * start;
|
15 | var barHeight = height * (end - start);
|
16 | return jsx("group", {
|
17 | style: {
|
18 | display: 'flex',
|
19 | top: top,
|
20 | left: position === 'left' ? left - context.px2hd('8px') : left + width
|
21 | }
|
22 | }, jsx("line", {
|
23 | style: {
|
24 | position: 'absolute',
|
25 | top: 0,
|
26 | left: 0,
|
27 | width: 0,
|
28 | height: height,
|
29 | stroke: 'rgba(202, 215, 239, .2)',
|
30 | lineCap: 'round',
|
31 | lineWidth: '8px'
|
32 | }
|
33 | }), jsx("line", {
|
34 | style: {
|
35 | position: 'absolute',
|
36 | top: barTop,
|
37 | width: 0,
|
38 | height: barHeight,
|
39 | stroke: 'rgba(202, 215, 239, .5)',
|
40 | lineCap: 'round',
|
41 | lineWidth: '8px'
|
42 | }
|
43 | }));
|
44 | }); |
\ | No newline at end of file |