javascript - highcharts, possible bug setting tooltip formatter and html? -


i have set these options:

                tooltip: {                     shared: true,                     usehtml: true,                     formatter: function() {                         return '<table style="text-align: center"><tr><td>{point.x:%y-%b-%e}</td></tr><tr><td>price: {point.y}</td></tr></table>';                   } 

but still output.

enter image description here

if use:

               tooltip: {                     shared: true,                     usehtml: true,                      headerformat: '<table style="text-align: center"><tr><td>{point.x:%y-%b-%e}</td></tr><tr><td>price: {point.y}</td></tr></table>',                     pointformat: '',                     footerformat: '',                     valuedecimals: 2                 }, 

then get:

enter image description here

however, when zoom out or 10 year period, same output first.

enter image description here

there seems bug when around 3 years used.

here jsfiddle demonstrates error:

https://jsfiddle.net/3ld2zmum/2/

zoom out all

in formatter should use reference point object , highcharts.dateformat

formatter: function () {             return '<table style="text-align: center"><tr><td>' + (highcharts.dateformat('%y-%b-%e', this.x)) + '</td></tr><tr><td>price: ' + this.y + ' </td></tr></table>';         }, 

https://jsfiddle.net/3ld2zmum/3/


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -