woocommerce/plugins/woocommerce-admin/client/dashboard/charts.js

47 lines
996 B
JavaScript
Raw Normal View History

2018-06-15 18:11:25 +00:00
/** @format */
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
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 (
<Card title={ __( 'Store Charts', 'wc-admin' ) }>
<div className="woocommerce-dashboard__widget">
2018-06-15 18:11:25 +00:00
<D3Chart
className="woocommerce-dashboard__widget-bar-chart"
2018-06-15 18:11:25 +00:00
data={ dummyOrders }
height={ 300 }
type={ 'line' }
width={ 1042 }
/>
</div>
<div className="woocommerce-dashboard__widget">
<D3Chart
className="woocommerce-dashboard__widget-bar-chart"
data={ dummyOrders }
height={ 300 }
type={ 'bar' }
2018-06-15 18:11:25 +00:00
width={ 1042 }
/>
</div>
</Card>
);
}
}
export default WidgetCharts;