Update LineChartProps.md

This commit is contained in:
Abhinandan Kushwaha 2022-04-22 19:05:41 +05:30 committed by GitHub
parent 06f42ac4df
commit 41c5919874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -293,13 +293,15 @@ type Pointer = {
};
```
**Note** If you are using the `pointerConfig` prop, the scroll will be disabled automatically. This is because, it's difficult to achive both scrolling line and scrolling pointer simultaneously. So if you want to retain the scroll behaviour even after passing the `pointerConfig` prop, then set the property `activatePointersOnLongPress` to true inside the pointerConfig object. This will make the pointers visible only after long press. So, before the long press, user can can scroll the line. Once long pressed, scolling will be disabled until the release of the long press.
The above properties can be understood with this labelled diagram-
<img src='../../demos/rainbow.png' alt='' height=400 width=500/>
**Note** If you are using the `pointerConfig` prop, the scroll will be disabled automatically. This is because, it's difficult to achive both scrolling line and scrolling pointer simultaneously. So if you want to retain the scroll behaviour even after passing the `pointerConfig` prop, then set the property `activatePointersOnLongPress` to true inside the pointerConfig object. This will make the pointers visible only after long press. So, before the long press, user can can scroll the line. Once long pressed, scrolling will be disabled until the release of the long press.
The duration after which a press event will be considered as long press can be controlled using the `activatePointersDelay` property inside the pointerConfig object. The default value of activatePointersDelay is 150.
### onPress and strip related props
Line or Area charts can be made interactive by allowing users to press on the chart and highlight that particular data point. For example-