score:1
Accepted answer
you just use the parameter visible
:
Highcharts.chart('container', {
chart: {
type: 'bar'
},
title: {
text: 'Historic World Population by Region'
},
subtitle: {
text: 'Source: <a href="https://en.wikipedia.org/wiki/World_population">Wikipedia.org</a>'
},
xAxis: {
categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: 'Population (millions)',
align: 'high'
},
labels: {
overflow: 'justify'
}
},
tooltip: {
valueSuffix: ' millions'
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -40,
y: 80,
floating: true,
borderWidth: 1,
backgroundColor:
Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
shadow: true
},
credits: {
enabled: false
},
series: [
/*{
visible: false,
name: 'Year 1800',
data: [107, 31, 635, 203, 2]
}, {
visible: false,
name: 'Year 1900',
data: [133, 156, 947, 408, 6]
}, {
visible: false,
name: 'Year 2000',
data: [814, 841, 3714, 727, 31]
}, */
{
visible: true,
name: 'Year 2016',
data: [1216, 1001, 4436, 738, 40]
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<figure class="highcharts-figure">
<div id="container"></div>
<p class="highcharts-description">
Bar chart showing horizontal columns. This chart type is often
beneficial for smaller screens, as the user can scroll through the data
vertically, and axis labels are easy to read.
</p>
</figure>
Source: stackoverflow.com
Related Query
- Highchart display single entry against each category in bar chart
- Android highcharts display single entry bar chart
- highchart change color of single bar in single category
- Highchart add a text under single bar in bar chart
- How to render a bar chart with different series with only one entry per category in HighCharts
- dealing with highcharts bar chart with really long category names
- How can I prevent my HighChart bar chart from being inverted?
- Passing in Id for each data item in bar chart using highcharts
- Highchart JSON pie chart display Slice undefined
- Category is not updating for drildown bar chart
- Get the end points of each bar in a highcharts column chart
- Setting color options on Highchart bar chart
- Highchart multiple bar charts in a single webpage
- How to display a Bar Chart in DataTable
- How to create chart with highchart in which bar doesn't start from 0 in y axis?
- HIghCharts bar chart renders columns on top of each other
- How to add one more value against at the end of each bar with a legend
- Updating single category data in Highcharts column chart
- Highchart Single Legend to control Multiple chart
- Display two labels for each bar in highcharts(one inside and one outside)
- HighChart Data label issue in bar chart
- Highcharts display label for pie chart using html table as data source
- How Can we display blocked area for particular timeline in horizontal bar in gantt highchart
- Highchart line chart with category do not occupy full width
- Highchart data each row on gridview to display different data on button click open modal
- Highchart multiple column range in same series on bar chart
- Highchart stacked bar chart pagination
- Highcharts single horizontal stacked bar chart with data names (labels) and %-ages always shown and data numbers and series name shown on mousehover
- set individual color for each bar in bar chart using highcharts
- Adding a link to each stacked bar chart item
More Query from same tag
- Highmaps Group Countries and Hover, Follow link on Click
- Missing documentation on generated HTML5 of jasperreports-highcharts
- How to draw arrows on a pie-chart with Highcharts?
- Hide 'Range Input' button in mobile full screen of highcharts
- Highcharts Omits X Axis Label
- How to prevent Highstock from hiding data rows
- How to get the period value from SMA technical indicators in highcharts?
- Search functionality to search for particular chart among multiple charts in dashboard
- disabling click event for a series highchart
- datatable inside Highcharts-Pie chart
- Ember JS: Highcharts.js into a component
- error with adjusting height of pie chart using highcharts
- highcharts splines chart - large data should plot specific data only
- Error while plotting data in rchart using HighChart
- Y-axis on large negative and small positive values in High Charts
- Highchart step line chart tooltip show old data when there is no data
- Highcharts get selected column index
- How to hide other series when clicking on legend on highcarts?
- Geojson Incomplete Rendering in JsFiddle for Highmaps Useage
- Change the color of bar on condition in highcharts
- highstock chart move selection on keybord arrow key press
- Formatting Tooltip of Values >1000
- API data into the Highscharts without key and value
- Export Multiple Highcharts to Multi-page PDF
- Pass a varible as input to Date.UTC
- After Formatting the x-Axis the initial and end values are not properly coming
- Add label to column chart of Highchart
- Highcharts legend custom css style / format using only highcharts options
- Javascript: Plotting data from a variable using HighCharts- no data passing
- how to show data label on mouse over in highcharts?