mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Update api.md (#8701)
Add clarification that you can pass type and quality options
This commit is contained in:
parent
2fc98ddc39
commit
8ed689877f
@ -85,13 +85,16 @@ myLineChart.clear();
|
||||
// => returns 'this' for chainability
|
||||
```
|
||||
|
||||
## .toBase64Image()
|
||||
## .toBase64Image(type?, quality?)
|
||||
|
||||
This returns a base 64 encoded string of the chart in its current state.
|
||||
|
||||
```javascript
|
||||
myLineChart.toBase64Image();
|
||||
// => returns png data url of the image on the canvas
|
||||
|
||||
myLineChart.toBase64Image('image/jpeg', 1)
|
||||
// => returns a jpeg data url in the highest quality of the canvas
|
||||
```
|
||||
|
||||
## .getElementsAtEventForMode(e, mode, options, useFinalPosition)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user