not sure precisely what you're looking for, but this might help.
i put together an example a while ago to adjust the height of the chart according to the number of bars, using some preset parameters:
var barcount = chartdata.length;
var pointwidth = 20;
var margintop = 60;
var marginright = 10;
var marginbottom = 50;
var marginleft = 100;
var pointpadding = 0.3;
var chartheight = margintop
+ ((pointwidth * barcount) * (1 + grouppadding + pointpadding));
so, tell it what size you want the bars, how much padding between them, how much margin at top and bottom of chart, and how many data points you have.
bars will stay the same size and spacing while the chart itself grows to accommodate them.
to see it work, change the 12 in this line:
var chartdata = randomdata(12, true);
to whatever number you want.
since you are working with grouped data, you'll have to change the math a little bit.you'll need to account for the number of groups, and multiply hat by the grouppadding, added to the number of points * the pointpadding.
you'll also have to make getting your count of data points slightly more complex.
this can be done with the
pointwidth parameter like:
pointwidth: 20 //width of the bar/column/point.
scrollbar you should probably upgrade to highstock but that only works horizontally. or you could set up a
div that allows the chart to be "larger" on the inside and scroll through that
- keep fixed size of the bars in Highcharts
- Highcharts columns - fixed border width, remove spacing between the bars
- What's the code in Highcharts such that the bars (columns) in the same group use the same color?
- Fixed padding between the bars in Highcharts
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- How to reduce the space between Bars with a fixed bar width in Highcharts column chart?
- How can i keep the color the same in highcharts
- Highcharts - Rotate pie chart aligning the clicked section to a fixed point (180°)
- Highcharts basic bar graphs. How to remove strokewith from the bars
- How do I get my highcharts to reduce in size when the window is resized down
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- how to display 2 same highcharts without duplicate the code
- How to keep the highcharts legend "on" while hiding the series
- Highcharts Bubble Chart - How to get the size of the point
- Remove the categories text under the bars on Highcharts chart
- Highcharts - Is it possible to customize the bars in column range type?
- Change the legend in highcharts heatmap to show instead of a color bar, a set of fixed icons with hide and show on click
- Highcharts - How do I keep both line points in from splitting between the two bar charts
- Modify the size of the tickPositions in HighCharts
- canvg and highcharts how to include chart legend and keep the chart size?
- Strange character in the Highstock source code
- I'm trying to create a bar graph with Highcharts JS, but the bars won't draw on the graph?
- HIghcharts - chart width not the size of the parent container
- Change the step size of Highcharts Drag?
- HighCharts - Selection Event keep the selection marked in graph
- highcharts donut pie - How to calculate pie size percentages after resize the chart
- Increase the size of one country on a HighCharts map?
- How can I get highcharts barChart bars to always fill the container?
- Get notice when a Highcharts chart is change after change the window size
- Highcharts - Space between bars based on the bars' width
More Query from same tag
- Highcharts Stockchart gui default line annotation color black
- In Highchart legend, the label color is the same with the color of shape
- Echarts how to highlight area between 2 line charts
- How to make the highchart fully occupied with the div that had set?
- ScatterPlot Point Click Event Not Working
- Click event outside series
- HighCharts BoxPlot With Multiple Series Having Single Data
- Highstock is only showing series when user zooms in
- Highcharts passing variable to tooltip
- How can I avoid moving flags when mouseovered - highcharts
- Need to make tooltip border color same as marker color using Highcharts
- highcharts for Angular 2 - No Directive annotation found on ChartComponent
- Highcharts and PHP
- Highcharts two date compare
- Alignment issue in high charts
- Highchart how to enlarge the plotBands in a gauge?
- Highcharts Parallel Coordinates: Hover/Highlight all series through point
- Highcharts stacked bar negative / positive total
- Clear/Reinitialize Highchart
- How to switch from 24hr to 12hr clock in Highstock chart?
- Datalabels on Highmaps appearing bottom to top
- Highcharts gantt chart : Task progress indicator need to show a single task for various status like completed,inprogress etc with different colors
- How do I properly format HighStock x-axis ticks based on unix timestamps?
- Adding image in highchart
- Highcharts C# To JSON - Structuring Series Data
- 2 similar Highstocks multiple data-series still tooltip and functionality not the same
- change startOnTick after a (High)chart has been created
- R highcharts color specific column on chart
- HighStock charts - Change default Open Price to Close Price
- Django chartit loading jquery and highcharts js