i think for your question depends on the value or label you are showing on your chart. for number or string, you can set the min and max on ticks.min and ticks.max and it is working for me in chart.js 2.8. not sure if chart.js 2.5 will work though since i saw some posts about how this feature is enhance in chart.js 2.6 release.
if your x-axis label is showing datetime object, and you are using type: 'time' in your options.scales.xaxes. then you can include your time.min and time.max inside xaxes.
week: 'd mmm yy'
// set this min max if you are using number or string as your axis label
// min: 10,
// max: 30
this is working for me and hopefully it helps you for your use case as well. let me know how it goes. cheers :)
- Chart.js LineChart how to show only part of dataset and support horizontal scrolling
- chart.js - how to draw and manage line when only one label present in chart js Linechart
- how to only show zero grid axes at center and hide all other gridlines in chart js
- Chartjs: how to show only max and min values on y-axis
- Remove the label and show only value in tooltips of a bar chart
- How to show data values in top of bar chart and line chart in chart.js 3
- ChartJS (React) Line Chart - How to show single tooltip with data and labels from 3 (multiple) dataset?
- In Chart.js >3.0, on axis of type time, how to show labels and ticks only for existing data points (make labels reflect data)?
- Chartjs 3.x - How to duplicate X axis on both sides of horizontal bar chart with only 1 dataset?
- How to plot chart from external JSON and format X-AXIS to show time using Chart.JS?
- How can I create a horizontal scroll effect with angular-chart.js and chart.js
- how to reduce list chart to one and use select dropdown to show selection without refresh page?
- how can i show labels and value in both on bar chart
- How to show tooltip only when data available in chart js?
- 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
- How to show symbols after the label and before the numeric value using chart.js Bar chart in Angular
- How to start the chart from specific time and offest hour and then show the data on chart from target datetime in chartjs
- Chart.js how to show line chart without displaying the labels on xaxis and yaxis
- How remove duplicates xAxis labels and show all values on chart
- how to show only each 15th x-labels in line chart chart.js in angular 6?
- How do you create rounded corners on the top and bottom of a bar chart and the between 2 part still draw like image?
- Chart.js how to make chart only show the most recent data
- Adding vertical and horizontal scroll to Chart js Bar graph
- how to show X and Y labels on points in Chart js 2 Line Chart
- chart js how do I only show just the low/high dots on line chart?
- 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
- How to show xaxis lable o only data point and hide all others?
- Chart.js - How to set a line chart dataset as disabled on load
- 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
More Query from same tag
- How to draw multiple color bars in a bar chart along a Horizontal Line using chart.js
- ChartJS Update callbacks
- Chart.js - Color specific parts of the background in a line chart
- PrimeNG/Chart.js - max Number of labels to show
- Angular Charts - not able to read data
- Adding X axis title causes Uncaught RangeError: minimumFractionDigits value is out of range in Chart.js
- Django 1.11 - child template not inheriting from parent
- Change label color Y and X axis chart.js
- Angularjs - Charts.js: Same chart element doesn't redraw on other view
- Can't bind to 'data' since it isn't a known property of 'canvas'
- Is there an option in chart.js to hide values in the graph legend
- Angular-Chart.js chart doesn't shown, if data added automatically
- Chart.js shaded regions
- What is the correct way to send 2 parameters in socket.io using lambdas? (I get undefined when printing in client and server)
- Change 'points' on a line chart to donuts using Chart.js
- Chart.js unable to create chart
- Can't pass data to chart.js graph
- Chart.js Doughnut Chart Sizing
- Chart.js : Controller for Scatter chart doesn't work for draw function
- HTML5 Canvas expanding the draw area after drawing
- Chartjs doesn't show chart properly with JSP
- How to skip x Axes labels in ChartJS
- Embed unique identifier in Chart.js segments?
- Why are the default Chart.js legend boxes transparent rectangles?
- Chart JS tooltip appears differently when set from script instead of html
- How to only draw the graph and the Xaxis gridlines using chart.js
- Chart.js stacked bar chart in opposite direction
- React passing a variable object to setState vs. an anonymous object to setState