score:1
Accepted answer
You can pass in options. While there is no option to directly set the horizontal spacing between grid lines, you can use the below (from http://www.chartjs.org/docs/#getting-started-global-chart-configuration)
// Creates a line chart in the same way
new Chart(ctx).LineAlt(data, {
scaleOverride: true,
scaleSteps: 10,
scaleStepWidth: 20,
scaleStartValue: 0,
});
Note that you need all 4 settings.
Adjust the scaleStepWidth to control the spacing.
Source: stackoverflow.com
Related Query
- change space between horizontal (grid) lines for line chart
- Plugin for custom horizontal line Y-axis marker on grid of a Line chart with Chart.js
- Chart Js Change Label orientation on x-Axis for Line Charts
- how to set chart.js grid color for line chart
- How to change grid line width for one specific line
- Chart.js - Line charts: draw points between grid lines
- to increase space between x axis and first horizontal bar in chart js
- Angular-chart / line chart with multiple horizontal lines (margins)
- How to change the label and grid line position on a timeseries chart in Chart.js 3?
- Change horizontal line chart to vertical line
- Is there any way to remove extra space and Horizontal line from Bar chart of Chart.js?
- chart.js line chart and "correct" spacing between points? (i.e. horizontal position based on percent of width, not fixed)
- How to remove Grid lines except for zero line and border Chartjs?
- Increase space between largest bar and top grid line in charts.js
- Chart js - Line chart cuts border for lines in boundaries
- Plotting Dashed Vertical and Horizontal lines on line graph for single point
- Chartjs change grid line color
- Draw horizontal line on chart in chart.js on v2
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- Chart.js how to show cursor pointer for labels & legends in line chart
- show label in tooltip but not in x axis for chartjs line chart
- Chart JS Fill Between two lines
- How to add second Y-axis for Bar and Line chart in Chart.js?
- chart.js Line chart with different background colors for each section
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- Chart js. How to change font styles for "labels" array?
- Chart.js - Line charts with different colors for each border lines
- Draw a horizontal and vertical line on mouse hover in chart js
- In ChartJS is it possible to change the line style between different points?
- How to hide the y axis and x axis line and label in my bar chart for chart.js
More Query from same tag
- ChartJS, updating chart type does not update xAxis properly
- How can I append a calculated value to the end of a bar in Chart.JS?
- Add different labels in a line chart - Chart.js
- Chart.js plugins overlapping tooltips
- Chartjs bar min, max and avarage value
- Displaying Chart with data retrieved from Entity Framework in Controller
- Draw Line Chart Using Chart.js
- Custom tooltip callback on one dataset (chartjs v 2.5)
- How can I add background color of length bars in chart (chartJS)?
- Show 'No data' in Pie when there is no data using VueJS and ChartJS?
- Multiple bubble chart datasets for chartjs
- ChartJS – is there any way to remove blank space around pie charts?
- I want to put my data in chartjs-plugin-streaming
- Emphasize a point in Chart.js
- Hide all scale labels in chartjs
- Time series data visualization using JSON
- How can we build charts on Polymer 1.0 using Chart.js?
- Chart.js - change which data the legend uses for the coloured box
- Usage of ChartJS v3 with TypeScript and Webpack
- How to hide the legend in chart.js in a react project?
- Chart Js Line chart with fill on click with full information of its legend text
- How to show data from views on chartjs in django?
- How to use saved data in Ionic/Angular?
- Multiple ChartJS scripts are not working at the same time
- How to create an animate-on-update Stacked Bar chart using Chart.js(or Chartist)?
- Displaying every nth label on the x-axis
- how to update chartjs2 option (scale.tick.max)
- Chart.js: call method outside of onRefresh() method
- How to filter react-chartjs-2
- ChartJS - would like to create a mixed chart with horizontal Bar and a dot to represent the answer from the current user