score:2
Accepted answer
in general, you can set static left margins by chart.marginleft
http://jsfiddle.net/blacklabel/f3frd95v/
however, it's not great solution if we don't know how much space we need. in that case i suggest to update charts after render: http://jsfiddle.net/blacklabel/f3frd95v/1/
var chart1 = highcharts.chart('container', {
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]
}]
});
var chart2 = highcharts.chart('container2', {
yaxis: {
labels: {
format: '{value}'
}
},
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].map(function(p) {
return p * 1e7;
})
}]
});
var leftmargin1 = chart1.plotleft,
leftmargin2 = chart2.plotleft;
if (leftmargin1 > leftmargin2) {
chart2.update({
chart: {
marginleft: leftmargin1
}
});
} else if (leftmargin2 > leftmargin1) {
chart1.update({
chart: {
marginleft: leftmargin2
}
});
}
Source: stackoverflow.com
Related Query
- Highcharts how to align two charts yAxis on the same line
- Highcharts - how to align two charts on a same line
- How to make two charts using highchart show up in the same line side by side using div
- Highcharts - How do I keep both line points in from splitting between the two bar charts
- How to cut off the line in highcharts between two pointI
- how to display 2 same highcharts without duplicate the code
- How to merge two Highcharts container with the same legend-item
- How to put two charts on the same page with different modules?
- Set at the same level the unit of two yaxis highcharts
- how to render multiple line charts - highcharts on same page using highcharts react wrapper - highcharts-react-offical
- How to make hover effect for two bar in highcharts at the same time is there any way by using css or any inbuilt method to achieve this?
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- How to show multiple HighCharts charts in the same page?
- Align second scatter series to the side similar to how column and bar charts do using HighCharts
- How to update the HighCharts title using drill-up when there are multiple charts on same page?
- Highcharts : How to align column chart and bubble chart vertically in the same series
- Highcharts Error #16: charts not showing on the same page
- how to remove the base line on the yaxis of highcharts?
- Align y axis tick "outside" on highstock, so they are the same as on highcharts
- How can i keep the color the same in highcharts
- How to plot line in highcharts on charts click event?
- drilldown maps and funnell charts on the same page using highcharts
- How to customize the crosshair Line for Highcharts
- How to get the Div id of charts in highcharts on click of it in angular 6
- How to fill the Area between two series with multiples yAxis in HighChart?
- In highcharts how do I change the color of the line above the categories?
- Highcharts show the same yAxis start and end value with multiple data series
- How to change space value between grid and yAxis in Highcharts line chart
- Highcharts: aligning data labels on the same line in bar charts
- How to re-create the same chart in Highcharts as seen on the mock?
More Query from same tag
- Area range legend icon does not match marker
- How to set datalebels formatter in highcharts
- displaying highchart's graphic
- Highcharts / Highstock horizontal plotLine label's vertical alignment?
- Plotting of Network Topology graph based on json input
- How to edit the html of a highchart label?
- Highcharts Export-data: Show notes in the data table
- highchart center align tspan inside text tag
- BorderRadius Using HighCharts HeatMap
- Create a floating bar in HighCharts cloud
- Negative values in the data not showing in highcharts linechart
- Highcharts svg convert to png with server
- Create highcharts vue component
- HighChart Avoiding points on the plotbackground
- How to correct mouse event in Highcharts
- highchatrs arabic translation is not working perfectly
- HIghcharts: Hide particular Bar in Bar chart
- How would I fill MAX MIN bullets in highcharts?
- JQuery UI Slider in Highcharts using more then one datapoint
- Why is my addPoint() not recognized as a function in my highcharts code?
- Unable to transform the data for rendering line charts: Highcharts+React
- Overlapping flags in Highstock
- HighStock chart get hange browser when new data fill at 10sec interval
- having trouble with AlphaVanatage API, which return a Json timeseries, and I am not able to work with in python, since I need to graph with Highgraph
- error while installing highcharts in angular app
- drilldown charts with more than one level
- Highcharts Export Server on AWS Lambda
- Trellis chart x categories values are not displaying correctly in Highcharts
- Have an issue with JavaScript, AJAX code displaying data
- Adding a Dropdown Select menu to select csv files in highcharts