* Default charts to 'time-comparison'

* Fix broken test in ReportChart
This commit is contained in:
Albert Juhé Lluveras 2018-11-22 07:03:35 -06:00 committed by GitHub
parent ff2c0014b5
commit 56d3a69d13
4 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ export class ReportChart extends Component {
getChartMode() {
const { filters, query } = this.props;
if ( ! filters ) {
return null;
return;
}
const clonedFilters = filters.slice( 0 );
const selectedFilter = this.getSelectedFilter( clonedFilters, query );

View File

@ -42,7 +42,7 @@ describe( 'ReportChart', () => {
);
const chart = reportChart.find( 'Chart' );
expect( chart.props().mode ).toEqual( null );
expect( chart.props().mode ).toBeUndefined();
} );
test( 'should set the mode prop depending on the active filter', () => {

View File

@ -409,7 +409,7 @@ Chart.defaultProps = {
xFormat: '%d',
x2Format: '%b %Y',
yFormat: '$.3s',
mode: 'item-comparison',
mode: 'time-comparison',
type: 'line',
interval: 'day',
};

View File

@ -275,7 +275,7 @@ D3Chart.defaultProps = {
right: 0,
top: 20,
},
mode: 'item-comparison',
mode: 'time-comparison',
tooltipPosition: 'over',
tooltipLabelFormat: '%B %d, %Y',
tooltipValueFormat: ',',