score:1
Accepted answer
you can use scale overwriting:
new chart(cnv.getcontext("2d")).line(data, {
scaleoverride: true,
scalestartvalue: 4,
scalestepwidth: 1,
scalesteps: 4,
});
this will produce 4,5,6,7,8
y axis (please note, you have to implement start point and steps number/width calculation)
Source: stackoverflow.com
Related Query
- Chartjs : Y axis starting with highest datapoint
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Chartjs 3.x - How to duplicate X axis on both sides of horizontal bar chart with only 1 dataset?
- How to combine lines with different starting points in chartjs
- Chartjs not working with d3 from csv source
- ChartJS Horizontal bars barely visible with 50 records on the Y axis
- How to set ChartJS Axis label with PrimeFaces
- How to set min max for x axis depend on data with Chartjs and Spring Boot?
- Updating Chartjs to 2.5 with custom code
- Chartjs chart with only one axis
- ChartJS with dates on the X axis not displaying any graph
- How to Change the Y axis of an Primefaces 7.0 ChartJS Linechart with Java?
- Chartjs 3.2 problem with setting whole numbers for Y axis
- ChartJS Tooltips with time axis and multiple datasets
- Chartjs Bar Chart Y Axis set base starting value to not be 0
- Chart.js with dual axis incorrect starting points (if negative values)
- Charts.js Formatting Y Axis with both Currency and Thousands Separator
- How to set ChartJS Y axis title?
- Custom Legend with ChartJS v2.0
- Chartjs random colors for each part of pie chart with data dynamically from database
- ChartJS - Draw chart with label by month, data by day
- Display line chart with connected dots using chartJS
- react-chartjs-2 with chartJs 3: Error "arc" is not a registered element
- Show bar with zero value in ChartJs v2
- Chart.js 2.0 Formatting Y Axis with Currency and Thousands Separator
- Chartjs linechart with only one point - how to center
- How to fix chart Legends width-height with overflow scroll in ChartJS
- ChartJS - Donut charts with multiple rings
More Query from same tag
- Internet Explorer 11 Chart using random values to update
- chart.js bar chart x-axis label disappeared
- How do I use plugins in ng2-charts?
- How to configure chart.js line chart with very low minimum height, and only 0 and 1 (no decimals) as ticks on the y-axis
- Where are the default colors for charts in Chart.js defined?
- How to set up a simple pie chart using React in ChartJS on codesandbox
- How to display label inside pie chart in Chartkick?
- Multi colored line chart angular and primeng
- Isn't draws vertical line on hover when I move cursor fast
- Chart.js -- using update() with time scale datasets
- Chart with Time axis only displaying first grid line and tick label (unitStepSize)
- Multiple dynamic vertical lines on a chart with Chart.js
- How do I resolve this error; 'document.getElementById('myChart').getContext' is undefined)?
- Remove Canvas then add new Canvas in same spot
- Canvas is already in use. Chart with ID '0' must be destroyed before the canvas can be reused. chat.JS
- Chart.js time series
- Dataset._meta[0].dataset is null in ChartJS
- CoreUI Chart type Bar- clickable bars to link to another page
- Is there a way to represent date hole in chartjs time series?
- ChartJS does not work on Windows 10 - in any browser
- ChartJS how to sync animations when page loads
- Showing a duration of time within a Chart.js chart
- Line chart: align x axis (timestamps) for multiple data sets
- Data not displaying properly in Chart.js line chart
- Chart Js Doughnut chart giving error
- Chart.js How can i make a horizontal lines like this?
- How to make sure tooltips never disappear on hover
- build dynamic array for charts.js
- how to fix this error Array to string conversion in laravel and chartjs?
- updating chartjs pie chart by using .keypress() not working