score:1
Accepted answer
Unfortunately, Highcharts does not support such a chart type. However, you can create it using two bar charts aligned horizontally. Check demo I posted you below.
HTML:
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="cnt">
<div id="container1"></div>
<div id="container2"></div>
</div>
CSS:
#container1,
#container2 {
width: 49%;
display: inline-block;
}
#cnt {
max-width: 800px;
margin: 0 auto;
}
JS:
var categories = [
'0-4', '5-9', '10-14', '15-19',
'20-24', '25-29', '30-34', '35-39', '40-44',
'45-49', '50-54', '55-59', '60-64', '65-69',
'70-74', '75-79', '80-84', '85-89', '90-94',
'95-99', '100 + '
];
Highcharts.chart('container1', {
chart: {
type: 'bar',
marginRight: 1
},
yAxis: {
min: 0,
reversed: true,
title: {
enabled: false
}
},
xAxis: {
visible: false,
reversed: false,
},
title: {
text: ''
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 30,
y: 10,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
credits: {
enabled: false
},
series: [{
pointPadding: 0,
groupPadding: 0,
name: 2011,
data: [
2.1, 2.0, 2.1, 2.3, 2.6,
2.9, 3.2, 3.1, 2.9, 3.4,
4.3, 4.0, 3.5, 2.9, 2.5,
2.7, 2.2, 1.1, 0.6, 0.2,
0.0
]
}, {
type: 'line',
color: '#000',
name: 2001,
marker: {
enabled: false
},
data: [
1.1, 1.0, 1.1, 2.1, 2.2,
2.4, 2.2, 3.1, 1.9, 2.4,
4.3, 4.7, 2.5, 2.2, 2.0,
2.1, 2.0, 1.5, 1.6, 1.2,
0.0
]
}]
});
Highcharts.chart('container2', {
chart: {
type: 'bar'
},
yAxis: {
min: 0,
enabled: false,
title: {
enabled: false
}
},
xAxis: {
reversed: false,
categories: categories,
tickLength: 0
},
title: {
text: ''
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -20,
y: 10,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
credits: {
enabled: false
},
series: [{
color: '#ccaadd',
pointPadding: 0,
groupPadding: 0,
name: 2011,
data: [
2.1, 2.0, 2.1, 2.3, 2.6,
2.9, 3.2, 3.1, 2.9, 3.4,
4.3, 4.0, 3.5, 2.9, 2.5,
2.7, 2.2, 1.1, 0.6, 0.2,
0.0
]
}, {
type: 'line',
color: '#000',
name: 2001,
marker: {
enabled: false
},
data: [
1.1, 1.0, 1.1, 2.1, 2.2,
2.4, 2.2, 3.1, 1.9, 2.4,
4.3, 4.7, 2.5, 2.2, 2.0,
2.1, 2.0, 1.5, 1.6, 1.2,
0.0
]
}]
});
Source: stackoverflow.com
Related Query
- Highcharts: How to shift yAxis to center (e.g.Population by sex and age group)
- Highcharts - how to properly update series[0].data and yAxis title of a VUMeter?
- How to center highcharts pie chart and legend on a page?
- Highcharts - how to create multiple y axis and group the data series
- How to change space value between grid and yAxis in Highcharts line chart
- How do I dynamically change the yAxis min, max and tickInterval in HighCharts
- How to center the yAxis title in Highcharts
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- How can I prepare a Group Stacked Bar Chart in Highcharts using multiple and different types of data?
- How to get xAxis and yAxis information on a Highcharts heatmap click event?
- How do I enlarge the pie chart and shift to the center
- How to highlight cells and yaxis ticks on highcharts heatmap hover
- how can I use rangeselector and navigation in highcharts in the given code
- How to create a column range chart in Highcharts using range and navigator functions?
- How to set Highcharts chart maximum yAxis value
- Highcharts - How to programmatically toggle legend items and determine which items are selected
- Hiding _groups_ of series in Highcharts and jQuery: how to get acceptable performance?
- how to import highcharts with webpack and babel
- How do you increase the performance of highcharts chart creation and rendering
- How to change graph colour above and below plotline in Highcharts
- Highcharts - How to hide series name and Y value in tooltip
- How to update new plotline values instead of removing and adding new ones in highcharts
- How do you add text to the bottom center of legend and bottom center of chart under legend?
- highcharts how to catch and insert logic in click reset zoom button event
- Highcharts - How to remove connecting line between fixed tooltip and point
- Plotting seconds, minutes and hours on the yAxis with Highcharts
- Remove space between yAxis and data in highcharts
- Highcharts - yAxis logarithmic scale and allowDecimals set to false not seeming to have any effect
- Highcharts : Venn Diagram how to show total and union numbers?
- how to make highcharts pie datalabels always in center of each slice?
More Query from same tag
- Iterate over a text label in HTML using JQUERY
- HTML displaying values in JavaScript "data"
- FillColor on Highcharts working differently
- How to maintain column width with multiple series in highcharts?
- Angular 3rd party library interaction
- Backfilling Highcharts chart with data from Ajax call
- Manual series names in highcharter
- Highcharts - prevent re-calculation of values when a series is hidden
- Using LINQ to generate Highchart column table data
- How to access Highcharts stock tooltip data in Vue?
- Simple, Open source PHP wrapper for Highcharts library
- How to make legend color show up in Highcharts for a line graph under certain conditions?
- Query selector for the individual buttons in range selector
- Highcharts chart not showing in IE9
- Focus function on highcharts not working in mozilla
- Highcharts xAxis values index
- Highcharts determine if text is outside of data point
- highcharts datalabel dynamic rotation as column height
- Highcharts: Make the legend symbol a square or rectangle
- Uncaught TypeError: undefined is not a function - Highcharts - MVC
- Highcharts: Not showing values, datetime type
- How to make map with overlaid column charts using highmaps
- Highcharts can not display ajax's return data
- The use of string argument in an "IF" statement
- Setting Highcharts x axis label's width
- Passing Returned Data from a PHP Script into a Highcharts data[] block?
- Formatting JSON data monthwise for HighCharts using MySQL
- How can i keep the color the same in highcharts
- Use highcharter inside a function
- Highcharts Pie Chart.How to set labels in two lines