score:7
Accepted answer
set maxHeight property. this will fix the maximum height of legend and gives navigation to legend.
maxHeight: 100,
here is the fiddle http://jsfiddle.net/9vZ8F/2/
instead if you remove
layout:'vertical'
legend will not occupy much space here is a fiddle for it http://jsfiddle.net/9vZ8F/1/
Hope this is useful to you.
score:1
How about doing a calculation on the number of series you have and adjusting the chart height based on that?
var series = [{
name: 'series 1',
data: usdeur
}, {
name: 'series 2',
data: usdeur
}, {
name: 'series 3',
data: usdeur
}, {
name: 'series 4',
data: usdeur
}, {
name: 'series 5',
data: usdeur
}
],
height = 400 + (series.length * 15);
$('#container').highcharts('StockChart', {
chart: {
borderWidth: 2,
height: height
},
legend: {
enabled: true,
layout: 'vertical'
},
navigator: {
//top: 200
},
rangeSelector: {
selected: 1
},
series: series
});
Source: stackoverflow.com
Related Query
- Highstock: When legend under the chart has many items, the chart height is small. How can I fix the height?
- How do i color the highcharts legend square symbol when my chart has multiple color entries
- How do you add text to the bottom center of legend and bottom center of chart under legend?
- Show gridLines when the chart is empty(no series) in highstock
- highcharts legend items align to the left when width is set
- Strange character in the Highstock source code
- How do you change the height value when more items are added to highcharts dynamically?
- highstock chart when loading via ajax has jerky behavior
- Highstock chart tooltip activation only when inside the chart
- How to make legend labels to bring out the series of a pie chart and not make them disappear when label is clicked in HighCharts?
- Highcharts - Fix chart height when it has legends
- Locating the legend in Release Burndown Chart Code
- Highcharts => Getting the id of a point when clicking on a line chart
- Displaying multiple series in the navigator of an HighStock chart
- Highcharts - Legend Positioning outside the chart
- Using Highcharts and displaying a message over or on the chart when there is no data
- Remove Tooltip in Synchronized Charts, When user leaves the chart area
- Highcharts - show every month on datetime x-axis when the parent container is small
- How can I configure the legend with a specific height in highstock?
- Get name of clicked point in Highcharts when the point has drilldown
- How to extract the data from highstock chart
- How to hide series via the legend in highstock ?
- Highcharts add tooltip that has a small arrow pointing toward the series
- put the highchart legend to the bottom of the chart and horizontally centered
- Highcharts stock chart - Technical Indicators - Stock price is missing in the tooltip when selecting the 'All' range
- How do I prevent Highstock right range handle keep slipping off the max value when adding data
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- In highcharts,tool-tip does not move when chart has high data unlike when it has low data
- How to show plotlines on highstock when its set much higher than the data series?
- Why do I have the issue 'property assigment expected' when I want to display a chart on my web page using highcharts
More Query from same tag
- Generate highcharts from v-for not populating all graphs with data
- how to show data json to 2 different highchart bar
- How to set different colors for bars based on value in Highchart bar chart?
- Highcharts- How to create streaming bar charts
- Ajax with HighCharts setData on Symfony 2
- Dual x-axis on same line with Highcharts. Possible?
- HighChart with large amount of data(complex structure) not working
- how to exclude last column from highchart from table
- Highchart Annotation Connector
- Show tootip and select pie slice on legend click of pie chart in HighCharts
- how to make different label for different arrows in Gauge chart in highchart
- Highchart Solid Gauge Responsive
- How to hide a specific x-axis label programmatically?
- Display time on Xaxis with line chart make by Highcharts
- Place Highstock inside a SVG
- Value or Logic Dependent Data Label format in Highcharts
- How is Highcharts.com documentation generated
- highcharts and wordpress
- How to work with Highcharts in AngularJS
- High Charts PieChart How Can I show point value inside segment and label name outside
- Highcharts solid gauge not coloured entirely
- How to set multiple colors in one series in highchart
- align chart columns left/right
- Complicated Rails query for reports with missing data
- How can I scrape Json data from Highcharts (stats.twitchapps.com)
- Highstock - Minimal Zoom
- Issue with Dates - trying to plot MongoDB data in Highcharts via PHP
- Highchart column bar doesn't appear exactly
- How to divide data from the series in highcharts
- Highcharts: options setting for customized renderer