score:0
Use the chartjs-plugin-zoom plugin for Chart.js where you can use zooming and padding to suit your needs.
plugins: {
zoom: {
pan: {
enabled: true
},
zoom: {
enabled: true
}
}
}
score:6
ChartJs doesn't support scrollable axis
natively. ChartJs charts are responsive and change width according to parent container. You can use this to create a large parent container and have your ChartJs canvas inside it. overflow: auto
property with little markup should give you the desired result.
See demo: http://jsfiddle.net/rbdqxfzL/140
HTML
<div class="chartWrapper">
<div class="chartAreaWrapper">
<canvas id="chart" height="400" width="15000"></canvas>
</div>
</div>
CSS
.chartWrapper {
position: relative;
}
.chartWrapper > canvas {
position: absolute;
left: 0;
top: 0;
pointer-events: none;
}
.chartAreaWrapper {
width: 15000px;
overflow-x: scroll;
}
Source: stackoverflow.com
Related Query
- how to make a chart.js bar chart scrollable
- How to make bar chart animation where all bars grow at the same speed?
- ChartJS: how to make a bar chart with a horizontal guideline:
- How to make bar chart cover multiple labels?
- how to make scrollable the legends of pie chart ( chart js )
- How to make 2 bar in a certain section of chart
- How to make a Chart.js Bar chart stay in its place
- How to make labels on both side from horizontal bar chart js
- How is it possible to make curved bar chart or curved column charts in chart.js?
- chart js 2 how to set bar width
- How can I make two of my lines in Chart JS thicker
- Chart.js Bar Chart - how to chart bars from 0
- How to put rounded corners on a Chart.js Bar chart
- chartjs : how to set custom scale in bar chart
- How can I make a stepline or stepped chart in chart.js or D3?
- How to add second Y-axis for Bar and Line chart in Chart.js?
- How to create stacked bar chart using react-chartjs-2?
- How do I draw a vertical line on a horizontal bar chart with ChartJS?
- How to display inline values in a stacked bar chart with Chart.js?
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- How to have solid colored bars in angular-chart bar chart
- How to draw Horizontal line on Bar Chart Chartjs
- how to add a title to my ng2-charts bar chart
- PrimeNg bar chart how to show a label for the y-axis
- how to programmatically make a line chart point active/highlighted
- How do I make line charts overlay over bar charts in chartjs
- How to make Chart JS responsive?
- How to set single color on each bar in angular chart js
- How to make customized stepSize for each horizontal bar in Chart.js graph
- How to show data values in top of bar chart and line chart in chart.js 3
More Query from same tag
- How to display a progress over time in one horizontally stacked bar with chartjs
- ChartJS: How to get labels, legend, title to show up?
- How to hide tooltips with their respective dataset
- Writing blank on canvas using fillText
- Scatterplot with 4 labels (Opposite Diagram) in any js library?
- How to Draw Gantt chart using chart js or other libraries
- Vue-chartjs: Re-render a chart even if data hasn't changed
- drawImage not working on canvas
- Mixed chart barchart won't show
- chart js graph legend colors
- Chart.js - make background text responsive
- DiscordAPIError: Invalid Form Body embed.image.url: Scheme "[object response]" is not supported. Scheme must be one of ('http', 'https')
- Chart.js disappears on Android
- Getting x,y values from chart click event
- Chart.js pie chart not showing in Google Chrome canvas
- How to seprate label and total value using array and pass to view
- Problem with primeNG chart: Module not found: Error: Can't resolve 'chart.js/auto'
- Chart.js Update to X Axis Not Updating
- Mouse-over function behaving weird in Chart.js
- ChartJs 2 How to remove numbers from the doughnut chart on loading
- chart js, loading data dynamically
- How to make intermittent lines to represent periods of presence and absence on a given line during it's length on Multi Axis chart?
- How to display date instead of year in morris line chart in js
- Chart.js not working on Angular 1.5?
- Chart js background color changes on click
- How to display Json object in chart js consisting of lists created using Django rest framework in angular application
- Chart js error in angular: Canvas is already in use. Chart with ID '0' must be destroyed before the canvas can be reused. Fix?
- Collect json disordered, order it and show it in chart.js
- How to scrape an interactive charts with scrapy?
- Can't pass data to chart.js graph