score:11
Accepted answer
You can do this by enabling dataLabels, and customising them. You will also need to format your data in a particular way:
$(function () {
$('#container').highcharts({
chart: { type:'bar',
},
xAxis: {
categories: ['Device 1', 'Device 2']
},
plotOptions: {
series: {
dataLabels: {
enabled: true,
formatter:function() {
return this.point.t;
}
}
}
},
series: [{
data: [{y:29.9,t:"12:45"}, {y:71.5,t:"14:45"}]
}]
});
});
The data in this example has an additional field defined 't' which contains the time you want to show on the bar. In the dataLabel formatter function, you can refer to all the data within each point, including 't' using this.point.t.
score:4
Please share your code...
Did you looking for this...
call openData() function from your highcharts series data
series: [{
name: 'BarName',
data: openData()
}]
openData() function
function openData() {
var fromDate =$('#startDate').val();
var toDate = $('#expireDate').val();
if(fromDate == '' || toDate == '' ){
// return false;
}
var data = 'fromDate='+fromDate+'&toDate='+toDate;
$.ajax({
url: 'apAppOpenChart.php',
data: data,
success: function(data) {
var chartData=[];
var retdata = jQuery.parseJSON(data);
var length =retdata.length;
for(var i=0; i<length; i++){
var jsDate = new Date(retdata[i][0]*1000);
var datejs = jsDate.getFullYear()+','+jsDate.getMonth()+','+jsDate.getDate();
}
chart.series[0].setData(retdata);
chart.redraw();
},
cache: false
});
}
Source: stackoverflow.com
Related Query
- print a value on highcharts bar graph?
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- missing value in highcharts line graph results in no line, just points
- Highcharts Change Bar Color Based on Value
- Highcharts dynamically change bar color based on value
- How to hyperlink bar graph in highcharts
- How do I get the value of a highcharts graph point on mouseover?
- Highcharts stacked bar graph as timeline
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- How to change area graph color above certain value in Highcharts
- Highcharts Change Bar Background Color Based on categories value
- Show all labels in highcharts horizontal bar graph
- Adding round corners to Highcharts Bar Chart with stacked bars when value is 0
- Dynamically set click event on bar from highcharts graph
- Highcharts highstocks - candlestick graph has last value partially cut
- Highcharts Backgroundimage for bar graph
- Highcharts Graph displaying 0 value continuously : Javascript Array
- How to create a single series bar graph with Highcharts
- Need a single border for stacked bar graph in Highcharts
- Plot a bar graph using Highcharts drilldown with two different JSON end points
- highcharts - Not able to switch between bar to column or vice versa graph type in drilldown
- How to achieve linear gradient for bar graph in highcharts
- Tooltip for Highcharts graph shows "undefined" in Chrome, but the correct value in Firefox
- Inserting Highcharts bar graph into sharepoint 2013 page
- My Highcharts graph with multiple axis ignores the max value I set for the first yaxis
- I'm trying to create a bar graph with Highcharts JS, but the bars won't draw on the graph?
- highcharts bar graph from json
- Make bar graph using highcharts from entries in the database
- Displaying a target area / value on a HighCharts graph
- Highcharts - Column Chart Drilldown, how to change the drilldown bar color based on some value
More Query from same tag
- dates cannot be shown on highcharts
- Highcharts instance created in which Angular life cycle hook
- Highcharts Tooltip At Column Chart
- How to set HighCharts x-axis value
- Want to move y-axis scrollbar with mouse wheel in highcharts/highstock
- Integrating Ember bindings with highcharts
- Add more data to High-chart X axis
- How to show only specific x-axis values on datetime axis in Highcharts
- highcharts positioner tooltip - general javascript
- How to modiffy Highchart size with slide effect
- How to set a static minimum value for axes in Highcharts
- How to change dividing point to comma in decimal value in Highcharts pie chart?
- Highcharts fill area point interval issue
- Stacked Bar Chart: Week vs Week
- Y axis values merging with candles in highcharts
- Not able to export Highchart.js after Drill Down
- Highcharts set xAxis values starting 12am and ends in 11pm
- how to show the remaining percent of Bar in Highcharts?
- does Highstock support a right border for a panel (yAxis)?
- Plot one point on Highcharts JS graph according to x-axis?
- highcharts bar graph from json
- How to create a chart with X and Y as strings?
- Hide the highcharts tracker from image
- VB.net 2 dimensional array with data from a list
- Update HighCharts chart when AJAX Updates my data on my page
- Wanted to plot only one spline at the chart load and further add other splines after loading
- Node-highcharts module not found
- Highcharts: how to dynamically set up max value of yAxis, based on the displayed data?
- Highcharts Column Range - How to render series data stored in PHP variables?
- Center Highstock chart scrollbar handle