score:107
the following applies to chart.js 2.*.
if you only have one x-axis, whether the vertical grid lines (that are related to this x-axis) are displayed or not, is specified by the boolean value of options.scales.xaxes[0].gridlines.display
. to be more precise, the following chart options disable the display of vertical grid lines for the single x-axis case.
options : {
scales : {
xaxes : [ {
gridlines : {
display : false
}
} ]
}
}
score:-1
simply write
options:{
grid:{
show: false
},
}
it will solve your problem
score:1
i think you can seperate x and y axis.
axes: { xaxis: { ticks: ticks, tickoptions: {showgridline:false} }, yaxis: { tickoptions: {showgridline:true} } }
hope this can help you.
score:2
try "scaleshowgridlines" : false,
score:5
options : {
scales: {
yaxes: [{
gridlines: {
linewidth: 0,
color: "rgba(255,255,255,0)"
}
}]
}
};
charts.js v2.0
score:9
the above answers seem outdated since they did not work in chartjs 3.4.1 (probably lower versions as well) for me.
you can now use the following:
options: {
scales: {
x: {
grid: {
display: false
}
},
}
}
it's self-explanatory, but to remove horizontal lines, you can replace the x with y.
score:18
there's a new global option that was released with the new version of chart.js two days ago.
var options = {
scaleshowverticallines: false
}
Source: stackoverflow.com
Related Query
- Remove the vertical line in the chart js line chart
- In Stacked horizontal bar chart how to remove the vertical line in Chart.js?
- Moving vertical line when hovering over the chart using chart.js
- How can I remove extra whitespace from the bottom of a line chart in chart.js?
- Chart.js remove the first vertical line
- vertical grid line not taking full hight of the canvas in chart js 3.3.2
- Moving vertical line when hovering over the chart using chart.js in v2.9.4
- How to remove a vertical line from the canvas of react-chartjs-2?
- Charts.js : How to remove the Vertical Black lines in Bar Chart
- Chart.js line chart is cut off at the top?
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- Draw a horizontal and vertical line on mouse hover in chart js
- How to align Chart.JS line chart labels to the center
- ChartJS: Draw vertical line at data point on chart on mouseover
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- Remove the label and show only value in tooltips of a bar chart
- Chart js vertical line z-index
- ChartJS Line chart cut off at the top and bottom
- Rotate 90 degrees clockwise the scaleLabel (no ticks or labels) on a Chart.js line chart
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- Chart.js - Color specific parts of the background in a line chart
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
- ChartJS: Remove padding to the right of chart caused by tick labels
- How to change the label and grid line position on a timeseries chart in Chart.js 3?
- Having problems getting a line chart in Chartsjs to go *up* to 1, with bkg fill *under* the chart line
- Remove background color in chartjs line chart
- display vertical axis label in line chart using chart.js
- How can I keep the vertical lines under the horizontal ruler line is chartjs?
- Chart.js -> line chart -> multiple points with the same X
- How to change the chart line or area colors according to the user need?
More Query from same tag
- Angular how to display data inside every part of doughnut chartjs
- Why prettier put a comma ',' at the last element of the object
- chart js same label, multi data
- Run Chartjs Dart example
- How to add text in centre of the doughnut chart using Chart.js?
- ChartJS v2 custom tooltip for rLabel
- Chart.js change label color
- How to remove a vertical line from the canvas of react-chartjs-2?
- ChartJs beforeDraw method not getting called in release build
- How can I format the x-axis using a timestamp via chart.js?
- Use JSON data in Chart.js chart
- How to trigger ChartJS legend onClick with out interrupting its normal working
- Display ellipsis for null or empty values in the bar chart using Chart.js
- Chartjs Graph is not showing in colorbox
- chart.js - display control timescale time zone
- react-chartjs-2 Line Chart not updating with State
- Is Chartjs compatible with PhoneGap?
- ChartJS and JSON result: Cannot set property 'fillColor' of undefined
- Change time format in Chart.js date
- How to get 2 doughnut charts in one chart (chartjs)
- Highlight a particular point in chart JS
- React-chartjs-2: How to display timeline of released dates over 5 past years in Bar Chart?
- How to create a histogram in charts.js with MYSQL data
- Chartjs export chart without html
- Is it possible to create different stepsize for different yAxis intervals on chartJs?
- Chartjs tooltip location when enlarged
- How to seprate label and total value using array and pass to view
- Chart.js data background color is overwriting point background color
- How to remove colored label square
- Chart.js Labelling - Need Two Labels on Y-axis of Horizontal Bar Chart