Default charts to 'time-comparison' (https://github.com/woocommerce/woocommerce-admin/pull/905)
* Default charts to 'time-comparison' * Fix broken test in ReportChart
This commit is contained in:
parent
ff2c0014b5
commit
56d3a69d13
|
@ -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 );
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -409,7 +409,7 @@ Chart.defaultProps = {
|
|||
xFormat: '%d',
|
||||
x2Format: '%b %Y',
|
||||
yFormat: '$.3s',
|
||||
mode: 'item-comparison',
|
||||
mode: 'time-comparison',
|
||||
type: 'line',
|
||||
interval: 'day',
|
||||
};
|
||||
|
|
|
@ -275,7 +275,7 @@ D3Chart.defaultProps = {
|
|||
right: 0,
|
||||
top: 20,
|
||||
},
|
||||
mode: 'item-comparison',
|
||||
mode: 'time-comparison',
|
||||
tooltipPosition: 'over',
|
||||
tooltipLabelFormat: '%B %d, %Y',
|
||||
tooltipValueFormat: ',',
|
||||
|
|
Loading…
Reference in New Issue