← All changes
|
classes/Visualizer/Gutenberg/src/Components/ChartSelect.js
+3
-4
3.10.13
→
3.6.1
View file →
| @@ -22,9 +22,9 @@ | ||
| 22 | 22 | import PanelButton from './PanelButton.js'; |
| 23 | 23 | |
| 24 | 24 | import merge from 'merge'; |
| 25 | 25 | |
| 26 | -import { compact, formatDate, isValidJSON, formatData, googleChartPackages } from '../utils.js'; | |
| 26 | +import { compact, formatDate, isValidJSON, formatData } from '../utils.js'; | |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * WordPress dependencies |
| 30 | 30 | */ |
| @@ -55,10 +55,11 @@ | ||
| 55 | 55 | }; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | render() { |
| 59 | - let chartVersion = 'undefined' !== typeof google.visualization ? google.visualization.Version : 'current'; | |
| 60 | 59 | |
| 60 | + let chartVersion = 'undefined' !== typeof google ? google.visualization.Version : 'current'; | |
| 61 | + | |
| 61 | 62 | let chart, footer; |
| 62 | 63 | |
| 63 | 64 | let data = formatDate( JSON.parse( JSON.stringify( this.props.chart ) ) ); |
| 64 | 65 | |
| @@ -171,9 +172,8 @@ | ||
| 171 | 172 | compact( this.props.chart['visualizer-settings']) |
| 172 | 173 | } |
| 173 | 174 | height="500px" |
| 174 | 175 | formatters={ formatData( data ) } |
| 175 | - chartPackages={ googleChartPackages } | |
| 176 | 176 | /> |
| 177 | 177 | ) : ( |
| 178 | 178 | <Chart |
| 179 | 179 | chartVersion={ chartVersion } |
| @@ -186,9 +186,8 @@ | ||
| 186 | 186 | compact( this.props.chart['visualizer-settings']) |
| 187 | 187 | } |
| 188 | 188 | height="500px" |
| 189 | 189 | formatters={ formatData( data ) } |
| 190 | - chartPackages={ googleChartPackages } | |
| 191 | 190 | /> |
| 192 | 191 | ) |
| 193 | 192 | ) } |
| 194 | 193 | |