score:2
Use formatter, where you can determine if label is last. See: http://jsfiddle.net/3bQne/664/
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
xAxis: {
type:'datetime',
tickInterval: 24 * 3600 * 1000,
labels: {
overflow: 'justify',
formatter: function (){
if(this.isLast){
return 'today ' + Highcharts.dateFormat('%H:%M', (new Date().getTime()));
} else {
return Highcharts.dateFormat('%e of %b', this.value);
}
}
}
},
series: [{
pointStart: Date.UTC(2013, 10, 3),
pointInterval: 24 * 3600 * 1000,
data: [29.9, 71.5, 106.4]
}]
});
Source: stackoverflow.com
Related Articles
- Highcharts.js How to put current time label in the end of xAxis
- Highcharts missing first date label on xAxis
- Highcharts - xAxis label for each point
- How to change Highcharts xAxis label color individually?
- HighCharts Time-based Quarterly Data - xAxis Label Issue
- Show only first and last xAxis label in Highcharts
- Difference between highcharts and highstock during real time trace and xAxis with max value
- HighCharts + xAxis label formatter
- Highstock Highcharts date time data on Xaxis
- Highcharts - date on xAxis label difference on tooltip
- Highcharts custom xAxis label
- How to show xAxis label in tooltip in a Highcharts area chart?
- highcharts xaxis datetime label with minor tick
- highcharts xAxis label set 0.5% step
- Highcharts display label for pie chart using html table as data source
- Highcharts - XAxis Label with LineFeed - how to make smaller gap?
- How to get current date and time on highcharts
- Highcharts renderer.rect on xAxis label not responsive
- Highcharts : using JSON data as label to xaxis
- Highcharts xAxis doesn't get the right time format
- Update xAxis individual label position for printing Highcharts
- The last label on xaxis disappears partly in Highcharts
- Highcharts Spiderweb chart xAxis labels disappear on long label name
- Highcharts AreaRange Chart issues with xAxis and last data point label
- HighCharts wrong xAxis label
- xAxis auto label dropping has stopped working after upgrading to Highcharts 5.0.8
- Tick and label for every xAxis Unit in Highcharts Chart
- Set the with of xAxis label to 50% on a Highcharts BarChart
- xAxis label is not visible properly in Highcharts
- Highcharts - How to hide the last category tick label on xAxis with scrollbar
- Highcharts tooltip using HTML allows advanced formatting like images
- Highcharts - adding a question mark where data is missing in a bar chart
- Drilldown in Pie Chart of hplot R
- Highcharts.js: Strange rendering of stacked graph
- Is possible to add a frame in 3d chart?
- Getting some error in guagechart of Highcharts in angular 6
- Highcharts: yAxis duration in hours resets every 24h
- Javascript variable with Comma separated values not working in HighChart
- Highchart not resize properly in angular js
- Highcharts - Highstock "inputEditDataFormat" breaking input
- Why does HighCharts reverse the order of my series?
- highcharts - pulling data from HTML but converting the strings to number
- remove previous markers and retain only single marker highchart
- Highchart from json object
- Highcharts Heatmap xAxis tick alignment
- Ionic 3 Highcharts not visible
- Angular4 with highcharts can't use world.js
- Uncaught TypeError: Object [object Object] has no method 'getElementsByTagName' in Highcharts
- In Highcharts, how to redraw chart after legend item width resized?
- Master - Detail Char in Sencha ExtJS 4.0