Remove Time Stamp Form Legend In HighChart

In this code snippet we will discuss how we can remove the time stamp from the legend in high chart. Some times it will not be good if we show the the default time stamps in the legend. So to remove the time stamp you can use the labelFormatter function.

  1. labelFormatter: function () {  
  2.    return this.name.toString().replace(' 00:00:00.000''').replace(' 00:00:00.00''').replace(' 00:00:00''');  
  3. }  

Just add that function in your legend settings will do the remaining. Happy Coding!.

Please see my other posts code snippets here: Code Snippets.