score:0
At the time of this answer, scrollbar can be added via highstock js. I managed to implement an elegant and simple scrollbar solution to my column chart, using only highcharts js, without highstock, as follows:
chart: {
type: 'column',
scrollablePlotArea: {
minWidth: {{ count($period_interval_categories) * 70}},
// nr of interval data x (40 + 30) where 40 are column width pixels and
// 30 is additional distancing between columns;
// Increase spacing pixels if needed
scrollPositionX: 1
}
},
plotOptions: {
column: {
stacking: 'normal',
pointWidth: 40, // column width in pixels
dataLabels: {
// enabled: true
}
}
},
where $period_interval_categories represents in my chart the period on x axis consisting of days, weeks, months, etc.
score:7
A similar question has already been answer here.
You can refer to this: How to enable scrollbars in highcharts
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
min: 6
},
legend: {
verticalAlign: 'top',
y: 100,
align: 'right'
},
scrollbar: {
enabled: true
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
score:14
If your code still doesn't work, you could try changing this :
<script type="text/javascript" src="js/highcharts.js"></script>
with this :
<script type="text/javascript" src="https://code.highcharts.com/stock/highstock.js"></script>
and you can add this :
scrollbar: {
enabled: true
},
finally, you can add this for how many data points you want to view at a time, example " min: 6 " :
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
min: 6 <!-- LOOK at this -->
},
Source: stackoverflow.com
Related Query
- Highcharts how to enable scrollbar without setting min or max
- How do i enable scrollbar in highcharts in react
- How to enable Highcharts scrollbar?
- How to enable or disable a Highcharts tooltip when a button is clicked?
- How to enable the vertical scrollbar in Highcharts?
- Angular Highcharts - How to enable noData options and update it dynamically
- How to enable noData with highcharts and angular
- How to avoid horizontal scrollbar in highcharts
- How do i add mouse wheel code in Angular2 highcharts in typescript
- how to display 2 same highcharts without duplicate the code
- how to hide/show scrollbar and range selector of highcharts on button click?
- How to edit tooltip in Highcharts C# code
- how to use highcharts tooltip formatter in python code
- How to enable marker on hover only for a range of points in highcharts
- Android highcharts how to enable or disable data labels
- Highcharts - How to I disable a series when I enable another one?
- How to use scrollbar on highcharts heatmap?
- How to use scrollbar on highcharts heatmap?
- How to enable scrolling in advanced accessible charts in highcharts
- How to create scrollbar in Highcharts
- Enable Horizontal Scrollbar in Highcharts with Multiple Pie Charts
- How to have multiple highcharts with different series data in vuejs without repeating code
- How to set the enable property to a highcharts line in page load
- Can I enable scrollbar for datetime x axis in Highcharts columnrange chart
- How we can show scrollbar if max index exceeded in highcharts timeline?
- Highcharts - How to deal with separately scrollbar on multi-charts
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- How to enable scrollbar in highchart
- how do i link my sqlite(PDO) databse data to highcharts code
- how to enable only 1 out of 2 column column graph by default when page loads in highcharts and the 2nd one gets visible when toggled in the legend
More Query from same tag
- Highcharts in Django using ajax
- Is there any possible way to make Bar of Pie in Highcharts?
- how to control orders of charts in highcharts combination charts?
- Add textbox to chart and draw strings
- Highcharts series label
- Highcharts area spline values have incorrect position on y-axis
- Highcharts: How to make Tooltip position to be visible in the Viewport
- HighCharts adding another variable
- put a text in all categories in Highcharts
- How to zoom chart line same as legend hover and reset automatically on button click in highcharts?
- Flask, Pandas, SQLITE3 passing datetime to HighCharts
- How do I increase the clickable area of a point in Highcharts so that whenever the point is 'active' a click can be recorded?
- Highchart heatmap grouped category plugin styling issues
- Align y axis tick "outside" on highstock, so they are the same as on highcharts
- javascript for loop through nested json values
- Show 1st of every month on highcharts
- colors for single series in highcharts
- How to add plotline on highcharts with angle?
- Date and time wrong on Highstock chart
- Highcharts points and lines are missing
- How to programmatically zoom in highcharts?
- Highcharts - Export with background color
- Argument of type .. is not assignable to parameter of type .. in Typescript and unit test
- Ember.js , HighCharts - accessing JSON data from controller
- How to store highcharts compatible json array data in mongodb
- highcharts bar chart square legend
- Highcharts large treemap how can I dynamically change allowDrillToNode flag?
- Highstock- show full data sets on x axis
- javascript - highchart xaxis datetime and yaxis data
- Formatter Using HighCharts