You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-40Lines changed: 14 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -249,47 +249,22 @@ Attributes marked with `*` are **mandatory**:
249
249
| opacityOnOverlap | Sets the opacity of the barrier when it is overlapping with other barrier. |
250
250
| high\*| Sets the price of the high barrier. |
251
251
| low\*| Sets the price of the low barrier. |
252
-
#### ~~Marker API~~ (Depricated)
252
+
#### Marker API
253
253
254
-
Markers provide a way fordevelopers to place DOM elements inside the chart that are positioned based on date, values or tick location. Unlike [CharIQ's Markers](http://documentation.chartiq.com/tutorial-Markers.html#main), we only allow markers to be placed on the main chart. Also note that this Marker implementation does not factor the width and height of the marker; this is expensive to calculate, so we expect you to offset thisin CSS.
254
+
Use `FastMarker` to render given components inside the chart.
255
+
Markers provide a way fordevelopers to place DOM elements that are positioned based on date, values or tick location inside the chart. Also, please note that this `FastMarker` implementation does not factor the width and height of the marker: this is expensive to calculate, so we expect you to offset thisin CSS.
256
+
`FastMarker` will keep the marker position on the chart.
257
+
It can be imported from `@deriv/deriv-chart` package either as `FastMarker`, or simply as `Marker`.
| className | Adds custom class name to marker. All markers have class name `stx-marker`. |
273
-
| x | x position of the chart; depends on `xPositioner`. |
274
-
| xPositioner | Determines x position. Choose between `epoch` or `none`. Defaults to `epoch`. |
275
-
| y | y position of the chart; depends on `yPositioner`. |
276
-
| yPositioner | Determines y position. Choose between `value` or `none`. Defaults to `value`. |
277
-
278
-
There are more options for`xPositioner` and `yPositioner`in [ChartIQ docs](http://documentation.chartiq.com/CIQ.Marker.html#main). What we document here is the most common use case.
279
-
280
-
#### Marker API
281
-
282
-
Use `FastMarker` to render given Components under stx-subholder.
283
-
It will keep the marker position on the chart.
284
-
285
-
```jsx
286
-
<FastMarker
287
-
markerRef={setRef}
288
-
threshold={optional visibility threshold}
289
-
className="your-css-class"
290
-
>
291
265
<your content here/>
292
-
</FastMarker>
266
+
</FastMarker>
267
+
</SmartChart>
293
268
294
269
```
295
270
@@ -308,7 +283,6 @@ USAGE:
308
283
309
284
PROPS:
310
285
311
-
- `threshold` (optional): the chart has a zoom level, the marker will be only shown within that threshold.
312
286
- `markerRef` (required): pass the `setRef` callback using this property
313
287
- `className` (optional): avoid expoensive css transition or keyframe animations on this class.
314
288
@@ -372,15 +346,15 @@ Here are the following components you can import:
> Note: ChartMode and Views have the same type of props. It include onChartType and onGranularity callback with portalNodeId
357
+
> Note: ChartMode and Views have the same type of props. It includes required `onChartType` and `onGranularity` callbacks and an optional `portalNodeId`.
##### 3. Independent Components: components that are not managed by the main store
666
640
667
-
Examples: `<Barrier />`, `<Marker />`
641
+
Examples: `<Barrier />`, `<ChartMode />`
668
642
669
643
Independent components is able to access the main store, but the main store has no control over independent components. As such, each independent component manages its own life cycle. Here is the interface for its store:
0 commit comments