PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.4
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.4
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | classes/Visualizer/Gutenberg/src/Components/ChartSelect.js +7 -18 3.10.113.4.4 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 } from '../utils.js';
27 27
28 28 /**
29 29 * WordPress dependencies
30 30 */
@@ -55,23 +55,18 @@
55 55 };
56 56 }
57 57
58 58 render() {
59 - let chartVersion = 'undefined' !== typeof google.visualization ? google.visualization.Version : 'current';
60 59
61 60 let chart, footer;
62 61
63 62 let data = formatDate( JSON.parse( JSON.stringify( this.props.chart ) ) );
64 63
65 - if ( 0 <= [ 'gauge', 'tabular', 'timeline' ].indexOf( this.props.chart['visualizer-chart-type']) ) {
66 - if ( 'DataTable' === data['visualizer-chart-library']) {
64 + if ( 0 <= [ 'gauge', 'table', 'timeline', 'dataTable' ].indexOf( this.props.chart['visualizer-chart-type']) ) {
65 + if ( 'dataTable' === data['visualizer-chart-type']) {
67 66 chart = data['visualizer-chart-type'];
68 67 } else {
69 - chart = this.props.chart['visualizer-chart-type'];
70 - if ( 'tabular' === chart ) {
71 - chart = 'table';
72 - }
73 - chart = startCase( chart );
68 + chart = startCase( this.props.chart['visualizer-chart-type']);
74 69 }
75 70 } else {
76 71 chart = `${ startCase( this.props.chart['visualizer-chart-type']) }Chart`;
77 72 }
@@ -138,9 +133,9 @@
138 133 isBack={ true }
139 134 />
140 135
141 136 { 'showAdvanced' === this.state.route &&
142 - <Sidebar chart={ this.props.chart } attributes={ this.props.attributes } edit={ this.props.editSettings } />
137 + <Sidebar chart={ this.props.chart } edit={ this.props.editSettings } />
143 138 }
144 139
145 140 { 'showPermissions' === this.state.route &&
146 141 <ChartPermissions chart={ this.props.chart } edit={ this.props.editPermissions } />
@@ -147,13 +142,13 @@
147 142 }
148 143 </InspectorControls>
149 144 }
150 145
151 - <div className="visualizer-settings__chart" data-chart-type={ chart }>
146 + <div className="visualizer-settings__chart">
152 147
153 148 { ( null !== this.props.chart ) &&
154 149
155 - ( 'DataTable' === data['visualizer-chart-library']) ? (
150 + ( 'dataTable' === chart ) ? (
156 151 <DataTable
157 152 id={ this.props.id }
158 153 rows={ data['visualizer-data'] }
159 154 columns={ data['visualizer-series'] }
@@ -160,9 +155,8 @@
160 155 options={ data['visualizer-settings'] }
161 156 />
162 157 ) : ( '' !== data['visualizer-data-exploded'] ? (
163 158 <Chart
164 - chartVersion={ chartVersion }
165 159 chartType={ chart }
166 160 rows={ data['visualizer-data'] }
167 161 columns={ data['visualizer-series'] }
168 162 options={
@@ -170,14 +164,11 @@
170 164 merge( compact( this.props.chart['visualizer-settings']), JSON.parse( this.props.chart['visualizer-settings'].manual ) ) :
171 165 compact( this.props.chart['visualizer-settings'])
172 166 }
173 167 height="500px"
174 - formatters={ formatData( data ) }
175 - chartPackages={ googleChartPackages }
176 168 />
177 169 ) : (
178 170 <Chart
179 - chartVersion={ chartVersion }
180 171 chartType={ chart }
181 172 rows={ data['visualizer-data'] }
182 173 columns={ data['visualizer-series'] }
183 174 options={
@@ -185,10 +176,8 @@
185 176 merge( compact( this.props.chart['visualizer-settings']), JSON.parse( this.props.chart['visualizer-settings'].manual ) ) :
186 177 compact( this.props.chart['visualizer-settings'])
187 178 }
188 179 height="500px"
189 - formatters={ formatData( data ) }
190 - chartPackages={ googleChartPackages }
191 180 />
192 181 )
193 182 ) }
194 183