woocommerce/plugins/woocommerce-admin/client/components/chart/example-hour.js

31 lines
579 B
JavaScript
Raw Normal View History

2018-09-05 20:52:35 +00:00
/** @format */
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
/**
* Internal dependencies
*/
import Card from 'components/card';
import Chart from './index';
2018-09-06 09:40:29 +00:00
import dummyOrders from './test/fixtures/dummy-hour';
2018-09-05 20:52:35 +00:00
class WidgetCharts extends Component {
render() {
return (
<Card title={ __( 'Test Categories', 'wc-admin' ) }>
<Chart
data={ dummyOrders }
tooltipFormat={ 'Hour of %H' }
type={ 'bar' }
xFormat={ '%H' }
/>
</Card>
);
}
}
export default WidgetCharts;