Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getGraph() {
const {orders} = this.props
const completed_at = orders.map(o => new Date(o.paid_at * 1000))
const pay_index = orders.map(o => o.pay_index)
this.chart = c3.generate({
zoom: {
enabled: true
},
subchart: {
size: 30,
show: true
},
bindto: '#order_graph',
data: {
type: 'spline',
colors: {
'pay index': 'orange'
},
x: 'x',
columns: [
['x', ...completed_at],