score:0
i was assuming that instead of defining scales.y.grid.display: false
, scales.y.grid.drawonchartarea: false
would work, but it doesn't.
as a workaround, you can define scales.y.grid.color
as shown below.
scales: {
y: {
grid: {
color: ['rgb(180,180,180)', null, null, null, 'rgb(180,180,180)'],
drawticks: false
},
...
please take a look at your amended stackblitz and see how it works.
Source: stackoverflow.com
Related Query
- vertical grid line not taking full hight of the canvas in chart js 3.3.2
- Remove the vertical line in the chart js line chart
- Moving vertical line when hovering over the chart using chart.js
- In Stacked horizontal bar chart how to remove the vertical line in Chart.js?
- How to change the label and grid line position on a timeseries chart in Chart.js 3?
- React JS Chart JS 2 is not hiding the grid lines in the background
- With Chart js, I am trying to color every 7th vertical (x axis) grid line (representing each week beginning visually)
- chartjs - Not taking the height in reponsive chart
- How to plot a line chart which has both the start and points outside the canvas area using Chart.js
- Moving vertical line when hovering over the chart using chart.js in v2.9.4
- ChartJs (ver: 2.8.0): Custom tooltip does not hide if clicked (or mouse pointer is moved) outside the chart canvas area
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
- How to remove a vertical line from the canvas of react-chartjs-2?
- Canvas line chart on this graph stretch beyond the assigned lengths
- chartjs line graph destroy function is not clearing the old chart instances
- Position of the x-axis labels is not in sync with the line chart data points
- Display Chartjs tooltip values outside the canvas - multi line chart
- Chart.js with line chart and bar chart - bar chart not rendered although the max value of it is shown
- Why is chart.js canvas not respecting the padding of the container element?
- Truncating canvas labels in ChartJS while keeping the full label value in the tooltips
- Chart.js: bar chart first bar and last bar not displaying in full
- Chart.js line chart is cut off at the top?
- show label in tooltip but not in x axis for chartjs line chart
- Bootstrap grid not working with canvas
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- Chart looks only grey, does not show the color - Chartjs,discordjs
- Angular-chart.js - Make line chart does not curve
- Draw a horizontal and vertical line on mouse hover in chart js
- How to align Chart.JS line chart labels to the center
- angular-chartjs line chart TypeError: t.merge is not a function
More Query from same tag
- How to open a new Tab with javascript and display some chart
- EJS Tags with ChartJS?
- How to refresh chart in django without refreshing whole page
- How to display data labels outside in pie chart with lines in ionic
- How to remove bars for those bars with zero value in Chartjs bar chart?
- Data Labels are getting cut off on the top
- How do I selecting a date range (like onClick but drag/select)
- Chart.js - Black bar colors in mobile devices
- chartjs: need color bars near yAxis scale
- How can i add multiple dataset in chart.js package in Laravel
- Is it possible to produce circular (round) shaped radar chart in Chart.js?
- How to apply gradient color in chart.js?
- Display chart data based on API call
- How to update chart when state changes in vue?
- Vue-chartjs with axios for stacked bar chart
- Formatting Data With Charts.JS
- Chart.js change vertical position of points
- How can i retrieve and override presets chart.js option in angular selector?
- ReactJs: componentWillReceiveProps doesn't get called for component whose redux action gets dispatched last
- How to draw horizontal Lines using chart.js 3.x ? Cannot get it working
- chart.js adjust height in mobile view
- how to populate my chartjs piechart dynamically
- Chart,js Pie Chart can the gap between a pie chart and the legend be adjusted
- Chart.js dataset label issue
- Chartjs does not show on pdf in yii2 despite showing in html view
- Display the triangle pointStyle of chartjs upside down
- Strange lines between horizontal bars in Chart.js 2.0
- ChartJS keeps adding one day to X axis. I cannot find a reason. Any suggestion?
- Copy div content to dynamically create a modal window:possible?
- Populate colors on a Chart.js chart dynamically