Drupal noob
Drupal noob

Reputation: 27

Using google translate with highcharts

I am wanting to use highcharts with google translate but google translate wraps all the text it translates in a double font tag which then makes is disappear as this is not recognised by svg.

I can stop it being translated by applying class=notranslate to the containing div but would really like to have the text translated.

Upvotes: 1

Views: 693

Answers (1)

Roco CTZ
Roco CTZ

Reputation: 1117

You can achieve this by using useHTML for your xAxis and yAxis labels.

To do this:

  • go to your xAxis and yAxis properties
  • add the labels property to each of them
  • add useHTML: true to the labels property

Please see working JSFiddle here

Link to relevant documentation:

Please note that the useHTML property can be used in some other areas of Highcharts, not only in axis labels. For example, you can use it for data labels on maps or other charts.

Upvotes: 2

Related Questions