Line Chart
JSX
<LineChart
axis={{
x: {
dateFormat: '%d-%b-%y',
scale: 'TIME',
ticks: 2
},
y: {
label: 'TAB_VIEW_CREDITS',
numberFormat: 'd',
scale: 'LOG',
text: {
style: {
'font-size': '.7rem'
}
},
ticks: 5
}
}}
data={[
{
data: [
{
x: new Date('2019-08-20T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-21T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-22T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-23T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-24T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-25T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-26T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-27T00:00:00.000Z'),
y: 2000
}
],
label: 'rob Allocation',
line: {
curveType: function noRefCheck() {},
fill: {
fill: 'rgba(11, 85, 167, 0.2)',
show: true
},
show: true,
stroke: 'rgb(11, 85, 167)',
strokeDashArray: '0',
strokeDashOffset: 0
},
point: {
fill: '#000',
radius: 4,
show: true,
stroke: ''
}
},
{
data: [
{
x: new Date('2019-08-20T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-21T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-22T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-23T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-24T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-25T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-26T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-27T00:00:00.000Z'),
y: 0
}
],
label: 'rob\'',
line: {
curveType: function noRefCheck() {},
fill: {
fill: 'rgba(11, 85, 167, 0.7)',
show: true
},
show: true,
stroke: '#000',
strokeDashArray: '0',
strokeDashOffset: 0
},
point: {
fill: '',
radius: 0,
show: false,
stroke: ''
}
},
{
data: [
{
x: new Date('2019-08-20T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-21T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-22T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-23T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-24T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-25T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-26T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-27T00:00:00.000Z'),
y: 0
}
],
label: 'Their Allocation',
line: {
curveType: function noRefCheck() {},
fill: {
fill: 'rgba(0, 169, 123, 0.2)',
show: true
},
show: true,
stroke: 'rgb(0, 169, 123)',
strokeDashArray: '0',
strokeDashOffset: 0
},
point: {
fill: '',
radius: 0,
show: false,
stroke: ''
}
},
{
data: [
{
x: new Date('2019-08-20T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-21T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-22T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-23T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-24T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-25T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-26T00:00:00.000Z'),
y: 0
},
{
x: new Date('2019-08-27T00:00:00.000Z'),
y: 0
}
],
label: 'Theirs',
line: {
curveType: function noRefCheck() {},
fill: {
fill: 'rgba(0, 169, 123, 0.7)',
show: true
},
show: true,
stroke: '#000',
strokeDashArray: '0',
strokeDashOffset: 0
},
point: {
fill: '',
radius: 0,
show: false,
stroke: ''
}
}
]}
grid={{
x: {
style: {
fill: '#000',
opacity: 1,
'shape-rendering': 'auto',
stroke: '#ccc',
'stroke-opacity': 0.4,
'stroke-width': 1,
visible: true
},
ticks: 5
},
y: {
style: {
fill: '#000',
opacity: 1,
'shape-rendering': 'auto',
stroke: '#ccc',
'stroke-opacity': 0.4,
'stroke-width': 1,
visible: true
},
ticks: 5
}
}}
width="100%"
/>| x | y |
|---|---|
| Tue Aug 20 2019 | 0 |
| Wed Aug 21 2019 | 0 |
| Thu Aug 22 2019 | 0 |
| Fri Aug 23 2019 | 0 |
| Sat Aug 24 2019 | 0 |
| Sun Aug 25 2019 | 0 |
| Mon Aug 26 2019 | 0 |
| Tue Aug 27 2019 | 2000 |
Log