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
- Chart.js extra undefined column
- Grouped Bar Chart ChartJS
- How to bind json array data to chart.js with same canvas id?
- Reactive Vue Chart.js component using Typescript
- Vue Chart JS options aren't used
- How to fix chart Legends width-height with overflow scroll in ChartJS
- How do I change the label and value like 500,000 to 500k in Chart.js?
- Chart.js - How to customize specific grid line depending on tick value
- How do you hide the title of a chart tooltip?
- Limit data points with chart js in React
- Non numeric for x-axis in scatter chart in CHART.js
- Se Chartjs horizontal
- How can I display different values on xAxes than on tooltip Chart.js V3
- Chart.js - Scale of secondary y-axis?
- Charts.js - Bar chart different colors for value intervals not working
- Chart.js load new data from saved JSON object
- Why is here a number?
- Custom data position on the doughnut chart in chart.js
- Chart.js Tooltips customization
- How to set the number of of rows in a line chart in chart.js?
- Chart JS - Remember hidden label state after page refresh
- ChartJS Bar Chart not respecting disabled legend when using cdn
- How can i add additional Data(Type) to chart.js
- Canvas Emptied but Reappears
- Remove specific label
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- How to wrap X axis labels to multi-lines (X axis label formatting) in ng2-Charts?
- Pie chart using chart.js
- manipulate objects from inside a function
- Unable to pass on data from json file to labels and datasets in chart.js