fix: chart label not being translated (#18212) (#18228)
* Fix chart translation issue
also used .html() instead of .text() in line 58, because otherwise it resulted in html escape errors. In french ' is used in many words and when using the text() method it results in this string being inserted '
* refactor: use data attribute
for semantic consistency
Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 13e6aca115)
Co-authored-by: aliX40 <55487948+aliX40@users.noreply.github.com>