score:0

Accepted answer

that is caused by the default pointformatter function:

            if (!milestone) {
                retval += 'start: ' + start + '<br/>';
                retval += 'end: ' + end + '<br/>';
            } else {
                retval += start + '<br/>';
            }

source code: https://github.com/highcharts/highcharts/blob/master/ts/series/gantt/ganttseries.ts#l116

as a solution you can implement your own pointformatter, for example:

    tooltip: {
        pointformatter: function() {
            var point = this,
                h = highcharts,
                series = point.series,
                xaxis = series.xaxis,
                startofweek = xaxis.options.startofweek,
                formats = series.tooltipoptions.datetimelabelformats,
                tooltip = series.chart.tooltip,
                ttoptions = series.tooltipoptions,
                format = ttoptions.xdateformat,
                returnval = '<b>' + (point.name || point.ycategory) + '</b>',
                start,
                end;

            if (!format) {
                format = h.splat(tooltip.getdateformat(xaxis.closestpointrange, point.start, startofweek, formats))[0];
            }

            start = series.chart.time.dateformat(format, point.start);
            end = series.chart.time.dateformat(format, point.end);

            returnval += '<br/>';
            returnval += 'a1: ' + start + '<br/>';
            returnval += 'a2: ' + end + '<br/>';

            return returnval;
        }
    }

live demo: https://jsfiddle.net/blacklabel/a839ylsd/

api reference: https://api.highcharts.com/gantt/tooltip.pointformatter


Related Query

More Query from same tag