2018-06-15 18:11:25 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { __ } from '@wordpress/i18n';
|
2018-07-05 12:18:02 +00:00
|
|
|
import { Component } from '@wordpress/element';
|
2018-06-15 18:11:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import Card from 'components/card';
|
|
|
|
import D3Chart from 'components/d3/charts';
|
2018-07-10 15:07:34 +00:00
|
|
|
import dummyOrders from 'components/d3/charts/test/fixtures/dummy';
|
2018-06-15 18:11:25 +00:00
|
|
|
|
|
|
|
class WidgetCharts extends Component {
|
|
|
|
constructor() {
|
|
|
|
super( ...arguments );
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2018-07-10 12:48:06 +00:00
|
|
|
<Card title={ __( 'Store Charts', 'wc-admin' ) }>
|
|
|
|
<div className="woocommerce-dashboard__widget">
|
2018-06-15 18:11:25 +00:00
|
|
|
<D3Chart
|
2018-07-10 12:48:06 +00:00
|
|
|
className="woocommerce-dashboard__widget-bar-chart"
|
2018-06-15 18:11:25 +00:00
|
|
|
data={ dummyOrders }
|
|
|
|
height={ 300 }
|
2018-07-03 14:44:10 +00:00
|
|
|
type={ 'line' }
|
|
|
|
width={ 1042 }
|
|
|
|
/>
|
|
|
|
</div>
|
2018-07-10 12:48:06 +00:00
|
|
|
<div className="woocommerce-dashboard__widget">
|
2018-07-03 14:44:10 +00:00
|
|
|
<D3Chart
|
2018-07-10 12:48:06 +00:00
|
|
|
className="woocommerce-dashboard__widget-bar-chart"
|
2018-07-03 14:44:10 +00:00
|
|
|
data={ dummyOrders }
|
|
|
|
height={ 300 }
|
|
|
|
type={ 'bar' }
|
2018-06-15 18:11:25 +00:00
|
|
|
width={ 1042 }
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</Card>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-05 12:18:02 +00:00
|
|
|
export default WidgetCharts;
|