Skip to content

Commit 870d8aa

Browse files
author
cristian-ungureanu
authored
Merge pull request #860 from Codeinwp/bugfix/859
Fix chart render issue in iOS browser
2 parents c2019ac + 63566b1 commit 870d8aa

File tree

6 files changed

+1791
-86
lines changed

6 files changed

+1791
-86
lines changed

.github/workflows/test-php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
with:
5252
php-version: '7.1'
5353
extensions: simplexml, mysql
54-
tools: phpunit:7.5.15
54+
tools: phpunit-polyfills
5555
- name: Checkout source code
5656
uses: actions/checkout@v2
5757
- name: Install WordPress Test Suite

classes/Visualizer/Gutenberg/build/block.js

Lines changed: 282 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

classes/Visualizer/Gutenberg/build/handsontable.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

classes/Visualizer/Gutenberg/src/Components/ChartRender.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ class ChartRender extends Component {
6161
footer = __( 'Annotations in this chart may not display here but they will display in the front end.' );
6262
}
6363

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.format ) {
66+
this.props.chart['visualizer-settings'].hAxis.format = 'YYYY-MM-dd';
67+
}
68+
}
69+
6470
return (
6571
<div className={ this.props.className }>
6672

0 commit comments

Comments
 (0)