score:0
you only need format label, after put ticks.
options.xaxis.tickpositioner = function () {
const ticks = this.series[0].xdata;
let result = [];
for (let index = 0; index < ticks.length; index++) {
result.push(ticks[index]);
}
return result;
};
and format xaxis
labels: {
format: "{value:%b-%y}",
align: "center"
}
to tooltips
tooltip: {
valuesuffix: "",
valueprefix: "",
xdateformat: "%b - %y",
valuedecimals: 0
},
score:5
it's little hacky, but you need also calculate information about labels and add them, for example: http://jsfiddle.net/avhal/
tickpositioner: function (min, max) {
var ticks = this.getlineartickpositions(this.tickinterval, min, max),
tlen = ticks.length;
ticks.info = {
unitname: "week",
higherranks: {},
totalrange: ticks[tlen - 1] - ticks[0]
};
return ticks;
}
so according to totalrange
, you need to pass unitname
- it's information which format should be taken from datetimelabelformats.
Source: stackoverflow.com
Related Query
- Highcharts label format with tickPositioner in a datetime x Axis
- last label in x axis with datetime format not coming in highchart
- Highcharts - with datetime axis labels overlap
- HighCharts scatter plot with Datetime on X Axis not plotting values correctly
- How can I force ticks/grid lines on a Highcharts datetime X axis to arbitrarily line up with data points?
- Highcharts datetime axis overlap with a long time series
- highcharts xaxis datetime label with minor tick
- Highcharts drilldown to pie chart - Clicking on axis label with multiple series causes pie charts to overlap
- Highcharts React update animations with datetime axis
- highcharts y axis label with offset is hidden when chart has no title
- How can I make Highcharts label a datetime X-axis with relative dates?
- Highcharts - Format X axis with 2 digit hours in 24 hour format
- Format X axis Label of Highcharts
- Highcharts : trouble with axis Label
- Highcharts - draw path on chart with datetime axis
- Category chart with datetime y axis in highcharts
- Highcharts with date and time for x axis (from a database with format YYYYMMDDHHMM)
- HighCharts show datetime format on xAxis
- How do I format x-axis label in highcharts
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Highcharts - Long multi-line y axis labels causing following label to be removed
- highcharts - removing decimal places on Y axis with only one point
- How to change axis label size when exporting in Highcharts / Highstock
- Highcharts axis label before first point
- HighCharts - number format with $ in its short form
- How to set dataLabel Format and axis label angle in R highcharter package
- Highcharts blank chart with x and y axis
- Wrong alignment in highcharts datetime points with xaxis
- How to show only specific x-axis values on datetime axis in Highcharts
- Highcharts - Global configuration with common code and unique data & Headings
More Query from same tag
- Plot a bar graph using Highcharts drilldown with two different JSON end points
- No animation when using addPoint()
- Arrows only for rangeSelector in HighCharts
- Highcharts and Ajax using php
- HighCharts x-axis not displaying correctly
- Alternate for highcharts-more
- How to get selected date from highstock?
- Highcharts: Show special marker on column chart
- How to add our own graph to Kibana?
- highcharts start from hinges base
- Hide or disable navigator handles in highcharts
- How to make HighStock / HighChart scroll bar location default to the left hand side?
- How to skip a value in highcharts.js?
- Highcharts: how do I add full data to multiple series in a chart
- Connect two different values with vertical line in highcharts
- Highcharts contextButton color
- Highcharts: when having multiple columns for the same X axis value, how can I get 1 tooltip per column?
- Highstocks is rounding all of my data
- Uncaught TypeError: Cannot read property '0' of undefined javascript error and with highcharts
- Highcharts prevent page on mobile Safari from moving up and down as I scroll horizontally through data points
- How can I get highcharter to represent a forecast object?
- Highcharts: Formatter and click function don't work with Angular
- Highcharts - how to display multiple graphs on one page using multiple xml files
- Hightlight x-axis label in Highcharts
- ng-highcharts not available
- Restoring GridstackJS Panels with Content (e.g. Highcharts)
- Show highchart graph in modal on same page by clicking on graph
- Extended Highcharts Boxplot to include mean line - how to remove extra line on resize?
- highmap : not able to display tooltip
- Highcharts reset zoom doesn't center data points