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 -17 3.10.43.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 } from '../utils.js';
26 +import { compact, formatDate, isValidJSON } from '../utils.js';
27 27
28 28 /**
29 29 * WordPress dependencies
30 30 */
@@ -56,23 +56,17 @@
56 56 }
57 57
58 58 render() {
59 59
60 - let chartVersion = 'undefined' !== typeof google ? google.visualization.Version : 'current';
61 -
62 60 let chart, footer;
63 61
64 62 let data = formatDate( JSON.parse( JSON.stringify( this.props.chart ) ) );
65 63
66 - if ( 0 <= [ 'gauge', 'tabular', 'timeline' ].indexOf( this.props.chart['visualizer-chart-type']) ) {
67 - 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']) {
68 66 chart = data['visualizer-chart-type'];
69 67 } else {
70 - chart = this.props.chart['visualizer-chart-type'];
71 - if ( 'tabular' === chart ) {
72 - chart = 'table';
73 - }
74 - chart = startCase( chart );
68 + chart = startCase( this.props.chart['visualizer-chart-type']);
75 69 }
76 70 } else {
77 71 chart = `${ startCase( this.props.chart['visualizer-chart-type']) }Chart`;
78 72 }
@@ -139,9 +133,9 @@
139 133 isBack={ true }
140 134 />
141 135
142 136 { 'showAdvanced' === this.state.route &&
143 - <Sidebar chart={ this.props.chart } attributes={ this.props.attributes } edit={ this.props.editSettings } />
137 + <Sidebar chart={ this.props.chart } edit={ this.props.editSettings } />
144 138 }
145 139
146 140 { 'showPermissions' === this.state.route &&
147 141 <ChartPermissions chart={ this.props.chart } edit={ this.props.editPermissions } />
@@ -148,13 +142,13 @@
148 142 }
149 143 </InspectorControls>
150 144 }
151 145
152 - <div className="visualizer-settings__chart" data-chart-type={ chart }>
146 + <div className="visualizer-settings__chart">
153 147
154 148 { ( null !== this.props.chart ) &&
155 149
156 - ( 'DataTable' === data['visualizer-chart-library']) ? (
150 + ( 'dataTable' === chart ) ? (
157 151 <DataTable
158 152 id={ this.props.id }
159 153 rows={ data['visualizer-data'] }
160 154 columns={ data['visualizer-series'] }
@@ -161,9 +155,8 @@
161 155 options={ data['visualizer-settings'] }
162 156 />
163 157 ) : ( '' !== data['visualizer-data-exploded'] ? (
164 158 <Chart
165 - chartVersion={ chartVersion }
166 159 chartType={ chart }
167 160 rows={ data['visualizer-data'] }
168 161 columns={ data['visualizer-series'] }
169 162 options={
@@ -171,13 +164,11 @@
171 164 merge( compact( this.props.chart['visualizer-settings']), JSON.parse( this.props.chart['visualizer-settings'].manual ) ) :
172 165 compact( this.props.chart['visualizer-settings'])
173 166 }
174 167 height="500px"
175 - formatters={ formatData( data ) }
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,9 +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 180 />
191 181 )
192 182 ) }
193 183