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: website/docs/examples/advanced-animations.mdx
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,29 @@ import ContextProvider from "../../src/components/ContextProvider";
8
8
9
9
# Animations
10
10
11
+
Google charts can smoothly animate your data as it changes.
12
+
13
+
To enable animations add the `animation` property of type [animation](https://developers.google.com/chart/interactive/docs/animation#transition-behavior) to the chart options parameter.
14
+
15
+
```jsx
16
+
import { Chart } from"react-google-charts";
17
+
18
+
<Chart
19
+
chartType="ScatterChart"
20
+
width="100%"
21
+
height="400px"
22
+
data={chartData}
23
+
options={{
24
+
title:"Company Performance",
25
+
legend: { position:"bottom" },
26
+
animation: {
27
+
duration:1000,
28
+
easing:"out",
29
+
},
30
+
}}
31
+
/>;
32
+
```
33
+
11
34
## Animate by changing the data
12
35
13
36
<ContextProvider>
@@ -28,3 +51,7 @@ import ContextProvider from "../../src/components/ContextProvider";
Controls are user interface widgets (such as category pickers, range sliders, autocompleters...) you interact with in order to drive the data managed by a dashboard and the charts that are part of it.
You can add a toolbar element to any visualization to enable the user to export the underlying data into a CSV file or an HTML table, or to provide code to embed the visualization into an arbitrary web page or gadget.
0 commit comments