Reputation: 4340
I have the following code and am trying to achieve 2 things.
As you'll see from the fiddle, I have used:
"gridlines": { "display": false, "drawBorder": false, "drawTicks": false}
But to no avail
Here is my basic line graph JSfiddle and the settings I've used https://jsfiddle.net/qogx7epL/
Upvotes: 0
Views: 281
Reputation: 36
Change your config object like that to remove plot borders: https://jsfiddle.net/3ko21xaq/
...
options: {
...
scales: {
yAxes: [{
gridLines: {
drawTicks: false,
display: false
},
...
}],
xAxes: [{
gridLines: {
drawTicks: false,
display: false
},
...
}]
},
},
To set x-axis to the top may do the trick this options: https://jsfiddle.net/d3s7x2af/
xAxes: [{
ticks: {
display: true,
position: "top", // Not found in documentation((
mirror: true,
padding: -400, // Set the height of the plot
},
}]
More about ticks configuration -> https://www.chartjs.org/docs/latest/axes/cartesian/#tick-configuration
Upvotes: 2