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.


Related Query

More Query from same tag