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
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -167,6 +167,10 @@ componentWillMount() {
167
167
}
168
168
```
169
169
170
+
### Scatter Charts
171
+
172
+
If you're using Chart.js 2.6 and below, add the `showLines: false` property to your chart options. This was later [added](https://github.com/chartjs/Chart.js/commit/7fa60523599a56255cde78a49e848166bd233c6e) in the default config, so users of later versions would not need to do this extra step.
@@ -203,6 +207,13 @@ Looks for the element under the event point, then returns all elements from that
203
207
}
204
208
```
205
209
210
+
### Working with Multiple Datasets
211
+
212
+
You will find that any event which causes the chart to re-render, such as hover tooltips, etc., will cause the first dataset to be copied over to other datasets, causing your lines and bars to merge together. This is because to track changes in the dataset series, the library needs a `key` to be specified - if none is found, it can't tell the difference between the datasets while updating. To get around this issue, you can take these two approaches:
213
+
214
+
1. Add a `label` property on each dataset. By default, this library uses the `label` property as the key to distinguish datasets.
215
+
2. Specify a different property to be used as a key by passing a `datasetKeyProvider` prop to your chart component, which would return a unique string value for each dataset.
216
+
206
217
## Development (`src`, `lib` and the build process)
207
218
208
219
**NOTE:** The source code for the component is in `src`. A transpiled CommonJS version (generated with Babel) is available in `lib` for use with node.js, browserify and webpack. A UMD bundle is also built to `dist`, which can be included without the need for any build system.
0 commit comments