Changing xDateFormat in highchart tooltip programatically -


i'm attempting change tooltip xdateformat programmatically. i'm calling:

chart.tooltip.options.xdateformat = getdateformatstring(newvalue.timeinterval); chart.redraw(); 

however, that's not doing need do. i'm playing around jsfiddle (pardon lack of knowledge of jquery, i'm writing in angular).

http://jsfiddle.net/2et8j/

thanks!

here's example changes formatter instead of trying change xdateformat. http://jsfiddle.net/eyyh6/

$("button").click(function() {     $(this).attr('disabled','disabled');         chart.tooltip.options.formatter = function() {         var s = '<b>'+ highcharts.dateformat('%b %e %y %h:%m', this.x, true) +'</b>';           $.each(this.points, function(i, point) {             s += '<br/>'+ point.series.name +': '+                 point.y +'m';         });          return s;     } }); 

edit: undocumented way change xdateformat

$("button").click(function() {     $(this).attr('disabled','disabled');         chart.series[0].tooltipoptions.xdateformat = '%b %e %y %h:%m'; }); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -