-1

I am having a super strange issue in my django app that renders graphs with chart js. I used i18n to handle the translation but after spending hours trying to fix my charts, I found out that when language is english the chart work well but when another language is selected, then it either dont work or show messed up values.

I don't even know what code to include since I can't figure out how language and the chart.js are related. Has someone had the same issue before? Or any clue how this could come from?

UPDATE: I may have a clue, it could be due to the fact that changing the language modifies the way numbers are shown. For example 25.5 in english becomes 25,5 in french. I think this creates the bug. Is there a way to change language without affecting the numbers conventions?

Murcielago
  • 905
  • 1
  • 8
  • 30

1 Answers1

-1

In case someone ever stumble here and has the same problem. Here is how to solve it.

You need to set

USE_L10N = False

this way it won't change the way numbers are formatted and therefore not change the graphs on chart.js

Murcielago
  • 905
  • 1
  • 8
  • 30