score:28
Accepted answer
You can edit your dataset display in your chart options :
options: {
scales: {
// The following will affect the vertical lines (xAxe) of your dataset
xAxes: [{
gridLines: {
// You can change the color, the dash effect, the main axe color, etc.
borderDash: [8, 4],
color: "#348632"
}
}],
// And this will affect the horizontal lines (yAxe) of your dataset
yAxes: [{
gridLines: {
borderDash: [8, 4],
color: "#348632"
}
}]
}
}
Now that you know how to do it, just change it as how you want it to be.
Check Grid Line Configuration on Chart.js documentation to see what is editable.
If needed, here are a working example on this jsFiddle and its result :
Source: stackoverflow.com
Related Query
- In Chart.js I want to show dotted gridLines like in below image
- How to show group by data just like sample image using Chart.js?
- Want to show small part of js Bar Chart when value is zero
- Chart Piechart in only show percentage on hover but it shows data and label with percentage both i just want to show percentage only percentage
- Histogram like chart with intensity colored columns and per bin opacity to show intensity
- How to draw a chart like below using chart js
- 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
- Is it possible to create just header tip visible bar chart with chart js just like in image
- I am Creating pie chart using Chartjs 2.6.0. I want to show label on Slices
- how to only show zero grid axes at center and hide all other gridlines in chart js
- Chart.js Show labels on Pie chart
- Converting Chart.js canvas chart to image using .toDataUrl() results in blank image
- chart.js: Show labels outside pie chart
- Chart.js how to show cursor pointer for labels & legends in line chart
- How to save Chart JS charts as image without black background using blobs and filesaver?
- show label in tooltip but not in x axis for chartjs line chart
- chartjs show dot point on hover over line chart
- Chart JS Show HTML in Tooltip
- chart js tooltip how to control the data that show
- How to show percentage (%) in chart js
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- Chart looks only grey, does not show the color - Chartjs,discordjs
- Chart JS show multiple data points for the same label
- Show data dynamically in line chart - ChartJS
- Blank PNG image using Chart JS . toBase64Image() function
- Chartjs - show elements in all datasets on hover using bar chart
- Remove the label and show only value in tooltips of a bar chart
- Chart Js Show the old data on mouse hover
- ChartJS: Show all labels of a mixed chart in the tooltip
- Show all values in Chart js y axis
More Query from same tag
- Change label color over a specific value in Chart.js
- chartjs-plugin-zoom not working with my React project
- JavaScript Chart.JS - Custom tooltips to add description of specific data point when hovering
- Chart.js: Is it able to connect two points of data where there are no data between them?
- Chart.js color change of the data points
- make chartjs legend labels tabbable
- hh:mm in chart.js on X-axis and text labels on the Y-axis
- End x-axis on last data point (scatter plot) for x,y numeric values
- Chart.js - x-axis and tooltip label shows "undefined" in Chrome when browser language is NOT English
- ChartJS - Show percentage base on data on hover (AngularJS)
- CharJS : Is it possible to display stacked bar chart with positive scale on both sides of 0 index
- Chart.js Draw a Stacked Bar Chart with Limit Line
- Equal distance grouped bar chart irrespective of scale - chart.js
- Chart.js: Reverse bar chart with regular bars (Bottom to top instead of top to bottom)
- Add mouseout event handler to legends in Chart.js
- reactive chart with chart.js in meteor
- Make Chart.js horizontal bar labels multi-line
- When using chart.js to draw a line chart, if the peak is between two x values instead of "at a x value"
- ChartJS pie chart, "filling" each segment to indicate another dimension
- Could not find a declaration file for module chartjs-plugin-stacked100
- Charts.js - Bubble chart with two word axis
- Getting (X,Y) point on mouse click on chart
- Chart.js Bar Chart with a switch/radio button to group data / Troubleshooting bar color
- Chartjs Custom Legend for Doughnut Chart Having Labelled Lines Sticking Out of Each Section
- 'require is not defined' error when attempting to use chartjs in javascript code
- How to change position from absolute to relative in charts in ChartJS
- Chart.js canvas resize
- Pie Chart using chart.js not showing up but bar charts are?
- Cannot visualise chartJS data in ASP .NET Core
- How to connect a charts.js chart to data