Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change alignment of Highchart tooltip?

I want to show some information in Farsi language on highchart tooltip. It works ok but the text align is not right.

As Persian language is a rtl language, I need to change text alignment so it starts from right. How can I do this?

like image 787
Morteza Avatar asked Dec 07 '25 03:12

Morteza


1 Answers

dont forget use:(useHTML: true,)

tooltip: {
useHTML: true,
 formatter: function() {
 return '<div lang="fa" dir="rtl"> ' +
 this.x + ' : ' + this.y +
 '</div>';
  }
},
like image 76
AmirAgha Avatar answered Dec 09 '25 00:12

AmirAgha