← All changes
|
classes/Visualizer/Gutenberg/src/Components/ChartRender.js
+1
-9
3.10.11
→
3.6.1
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 | */ |
| @@ -60,14 +60,8 @@ | ||
| 60 | 60 | if ( data['visualizer-data-exploded']) { |
| 61 | 61 | footer = __( 'Annotations in this chart may not display here but they will display in the front end.' ); |
| 62 | 62 | } |
| 63 | 63 | |
| 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 ) ) { | |
| 66 | - this.props.chart['visualizer-settings'].hAxis.format = 'YYYY-MM-dd'; | |
| 67 | - } | |
| 68 | - } | |
| 69 | - | |
| 70 | 64 | return ( |
| 71 | 65 | <div className={ this.props.className }> |
| 72 | 66 | |
| 73 | 67 | { ( null !== this.props.chart ) && |
| @@ -107,9 +101,8 @@ | ||
| 107 | 101 | compact( this.props.chart['visualizer-settings']) |
| 108 | 102 | } |
| 109 | 103 | height="500px" |
| 110 | 104 | formatters={ formatData( data ) } |
| 111 | - chartPackages={ googleChartPackages } | |
| 112 | 105 | /> |
| 113 | 106 | ) : ( |
| 114 | 107 | <Chart |
| 115 | 108 | chartVersion={ chartVersion } |
| @@ -122,9 +115,8 @@ | ||
| 122 | 115 | compact( this.props.chart['visualizer-settings']) |
| 123 | 116 | } |
| 124 | 117 | height="500px" |
| 125 | 118 | formatters={ formatData( data ) } |
| 126 | - chartPackages={ googleChartPackages } | |
| 127 | 119 | /> |
| 128 | 120 | ) ) } |
| 129 | 121 | |
| 130 | 122 | <div className="visualizer-settings__charts-footer"><sub> |