@hopara/react 0.4.2 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -9
- package/build/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ You can further customize the integration by using the component props:
|
|
|
45
45
|
```typescript
|
|
46
46
|
type HoparaProps = {
|
|
47
47
|
// The visualization id
|
|
48
|
-
|
|
48
|
+
visualizationId: string
|
|
49
49
|
|
|
50
50
|
// The accessToken fetched from the auth API
|
|
51
51
|
accessToken: string
|
|
@@ -53,9 +53,6 @@ type HoparaProps = {
|
|
|
53
53
|
// Switch the theme mode to dark scheme (default: false)
|
|
54
54
|
darkMode: boolean | undefined
|
|
55
55
|
|
|
56
|
-
// Sets if the toolbar should be rendered (default: true)
|
|
57
|
-
toolbar: boolean | undefined
|
|
58
|
-
|
|
59
56
|
// Overwrites data at rendering time
|
|
60
57
|
dataLoaders: DataLoader[] | undefined
|
|
61
58
|
|
|
@@ -100,7 +97,7 @@ By default Hopara will load the same visualization and data as seen as in [hopar
|
|
|
100
97
|
```typescript
|
|
101
98
|
type DataLoader = {
|
|
102
99
|
// query name
|
|
103
|
-
|
|
100
|
+
query: string
|
|
104
101
|
|
|
105
102
|
// data source name
|
|
106
103
|
source: string
|
|
@@ -115,7 +112,7 @@ type DataLoader = {
|
|
|
115
112
|
|
|
116
113
|
```jsx
|
|
117
114
|
const dataLoaders = [{
|
|
118
|
-
|
|
115
|
+
query: 'queryName',
|
|
119
116
|
source: 'dataSourceName',
|
|
120
117
|
loader: async () => {
|
|
121
118
|
return [
|
|
@@ -172,7 +169,7 @@ The initial row prop centers the visualization around a specific row (e.g. asset
|
|
|
172
169
|
|
|
173
170
|
```typescript
|
|
174
171
|
type InitialRow = {
|
|
175
|
-
|
|
172
|
+
layerId: string
|
|
176
173
|
rowId: string
|
|
177
174
|
}
|
|
178
175
|
```
|
|
@@ -184,7 +181,7 @@ The available options are `'none'`, `'building'`, `'dark'`, `'light'`, `'light-s
|
|
|
184
181
|
|
|
185
182
|
```jsx
|
|
186
183
|
Hopara.init({
|
|
187
|
-
|
|
184
|
+
visualizationId: 'my-hopara-viz',
|
|
188
185
|
accessToken: 'my-hopara-token',
|
|
189
186
|
targetElementId: 'my-target-element',
|
|
190
187
|
mapStyle: 'building',
|
|
@@ -203,7 +200,7 @@ type CallbackFunction = {
|
|
|
203
200
|
|
|
204
201
|
```jsx
|
|
205
202
|
Hopara.init({
|
|
206
|
-
|
|
203
|
+
visualizationId: 'my-hopara-viz',
|
|
207
204
|
accessToken: 'my-hopara-token',
|
|
208
205
|
targetElementId: 'my-target-element',
|
|
209
206
|
callbacks: [
|