Skip to content

Commit fecc082

Browse files
authored
docs: update infovis sidebar (#269)
1 parent 8bf71ed commit fecc082

File tree

3 files changed

+98
-4
lines changed

3 files changed

+98
-4
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,49 @@
11
# TimeAxisLayer
2+
3+
Draws a horizontal time axis with tick marks and labels.
4+
5+
```js
6+
import {TimeAxisLayer} from '@deck.gl-community/infovis-layers';
7+
8+
new TimeAxisLayer({
9+
id: 'axis',
10+
startTimeMs: Date.now() - 10000,
11+
endTimeMs: Date.now(),
12+
tickCount: 5,
13+
y: 0
14+
});
15+
```
16+
17+
## Properties
18+
19+
Inherits from all [CompositeLayer](https://deck.gl/docs/api-reference/core/composite-layer) properties.
20+
21+
### `unit` ('timestamp' | 'milliseconds', optional)
22+
Format for tick labels. Default: `'timestamp'`.
23+
24+
### `startTimeMs` (Number, required)
25+
Start time in milliseconds since epoch.
26+
27+
### `endTimeMs` (Number, required)
28+
End time in milliseconds since epoch.
29+
30+
### `tickCount` (Number, optional)
31+
Number of tick marks. Default: `5`.
32+
33+
### `y` (Number, optional)
34+
Y coordinate of the axis line. Default: `0`.
35+
36+
### `color` (Color, optional)
37+
RGBA color for axis lines and labels. Default: `[0, 0, 0, 255]`.
38+
39+
### `bounds` (Bounds, optional)
40+
Override viewport bounds for the axis.
41+
42+
## Sub Layers
43+
44+
- `LineLayer` for axis and ticks
45+
- `TextLayer` for labels
46+
47+
## Source
48+
49+
[modules/infovis-layers/src/layers/time-axis-layer.ts](https://github.com/visgl/deck.gl/tree/master/modules/infovis-layers/src/layers/time-axis-layer.ts)

docs/modules/infovis-layers/api-reference/vertical-grid-layer.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,51 @@ export type VerticalGridLayerProps = LayerProps & {
99
yMax?: number; // Maximum Y-coordinate for grid lines
1010
width?: number; // Optional: Width of the grid lines (default: 1)
1111
color?: [number, number, number, number]; // Optional: RGBA color for grid lines (default: [200, 200, 200, 255])
12-
};
12+
};
1313
```
14+
15+
Render evenly spaced vertical grid lines along the x-axis.
16+
17+
```js
18+
import {VerticalGridLayer} from '@deck.gl-community/infovis-layers';
19+
20+
new VerticalGridLayer({
21+
id: 'grid',
22+
xMin: 0,
23+
xMax: 1000,
24+
tickCount: 5,
25+
yMin: -100,
26+
yMax: 100,
27+
color: [200, 200, 200, 255]
28+
});
29+
```
30+
31+
## Properties
32+
33+
Inherits from all [CompositeLayer](https://deck.gl/docs/api-reference/core/composite-layer) properties.
34+
35+
### `xMin` (Number, required)
36+
Start time in milliseconds since epoch.
37+
38+
### `xMax` (Number, required)
39+
End time in milliseconds since epoch.
40+
41+
### `tickCount` (Number, optional)
42+
Number of grid lines to draw. Default: `5`.
43+
44+
### `yMin`, `yMax` (Number, optional)
45+
Vertical range of grid lines. Defaults: `-1e6` to `1e6`.
46+
47+
### `width` (Number, optional)
48+
Line width in pixels. Default: `1`.
49+
50+
### `color` (Color, optional)
51+
RGBA color for grid lines. Default: `[200, 200, 200, 255]`.
52+
53+
## Sub Layers
54+
55+
- `LineLayer` for grid lines
56+
57+
## Source
58+
59+
[modules/infovis-layers/src/layers/vertical-grid-layer.ts](https://github.com/visgl/deck.gl/tree/master/modules/infovis-layers/src/layers/vertical-grid-layer.ts)

docs/modules/infovis-layers/sidebar.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"label": "@deck.gl-community/infovis-layers",
44
"items": [
55
"modules/infovis-layers/README",
6-
"modules/infovis-layers/api-reference/time-axis-layer",
7-
"modules/infovis-layers/api-reference/vertical-grid-layer",
86
"modules/infovis-layers/api-reference/horizon-graph-layer",
9-
"modules/infovis-layers/api-reference/multi-horizon-graph-layer"
7+
"modules/infovis-layers/api-reference/multi-horizon-graph-layer",
8+
"modules/infovis-layers/api-reference/time-axis-layer",
9+
"modules/infovis-layers/api-reference/vertical-grid-layer"
1010
]
1111
}

0 commit comments

Comments
 (0)