Reputation: 1701
I have a line chart rendered with Chart.js and I display the X axis at the bottom:
xAxes: [{ type: 'linear',
position: 'bottom',
I would like to have two X axis, one at the bottom and one at the top.
I see in the documentation that position
is a string, thus one value only.
Is it possible to accomplish this?
Upvotes: 8
Views: 13552
Reputation: 320
This is an old question, but I just had the same problem. Luckily the value of xAxes is an array, so you define multiple axes like this:
xAxes: [
{ position: 'top' },
{ position: 'bottom', ... other definitions here ... }
]
Upvotes: 11