← All changes
|
classes/Visualizer/Gutenberg/src/Components/ChartRender.js
+2
-4
3.10.12
→
3.7.2
View file →
| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | import DataTable from './DataTable.js'; |
| 7 | 7 | |
| 8 | 8 | import merge from 'merge'; |
| 9 | 9 | |
| 10 | -import { compact, formatDate, isValidJSON, formatData, googleChartPackages } from '../utils.js'; | |
| 10 | +import { compact, formatDate, isValidJSON, formatData } from '../utils.js'; | |
| 11 | 11 | |
| 12 | 12 | /** |
| 13 | 13 | * WordPress dependencies |
| 14 | 14 | */ |
| @@ -61,9 +61,9 @@ | ||
| 61 | 61 | footer = __( 'Annotations in this chart may not display here but they will display in the front end.' ); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | if ( this.props.chart['visualizer-series'] && 0 <= [ 'date', 'datetime', 'timeofday' ].indexOf( this.props.chart['visualizer-series'][0].type ) ) { |
| 65 | - if ( this.props.chart['visualizer-settings'] && ( this.props.chart['visualizer-settings'].hAxis && '' == this.props.chart['visualizer-settings'].hAxis.format ) ) { | |
| 65 | + if ( this.props.chart['visualizer-settings'] && '' == this.props.chart['visualizer-settings'].hAxis.format ) { | |
| 66 | 66 | this.props.chart['visualizer-settings'].hAxis.format = 'YYYY-MM-dd'; |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
| @@ -107,9 +107,8 @@ | ||
| 107 | 107 | compact( this.props.chart['visualizer-settings']) |
| 108 | 108 | } |
| 109 | 109 | height="500px" |
| 110 | 110 | formatters={ formatData( data ) } |
| 111 | - chartPackages={ googleChartPackages } | |
| 112 | 111 | /> |
| 113 | 112 | ) : ( |
| 114 | 113 | <Chart |
| 115 | 114 | chartVersion={ chartVersion } |
| @@ -122,9 +121,8 @@ | ||
| 122 | 121 | compact( this.props.chart['visualizer-settings']) |
| 123 | 122 | } |
| 124 | 123 | height="500px" |
| 125 | 124 | formatters={ formatData( data ) } |
| 126 | - chartPackages={ googleChartPackages } | |
| 127 | 125 | /> |
| 128 | 126 | ) ) } |
| 129 | 127 | |
| 130 | 128 | <div className="visualizer-settings__charts-footer"><sub> |