我无法在Google图表中显示阿拉伯数字 [英] i can not show arabic-indic numbers in google chart

查看:263
本文介绍了我无法在Google图表中显示阿拉伯数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将google图表中的vaxis格式化为arabic-indic
这是官方文档:



我对xaxis没有任何问题,我需要它们的格式像1,2,3 ...

解决方案

有一个解决方案,但你必须使用未记录的功能,这些功能将在某个时刻记录下来。您需要在绘制图表之前的某个时间进行调用。

  google.visualization.NumberFormat.useNativeCharactersIfAvailable(true); 

这适用于v46之前的材质图表,也适用于以v46开头的经典图表。看到这个例子: https://jsfiddle.net/dlaliberte/6k8vdgz7/



您可能会看到一些问题,具体取决于您指定的格式选项。


is it possiable to format the vaxis in google chart to arabic-indic this is the officially documentation : Google chart

however i looked through the whole documentation i did not find anything

i have no problem with xaxis the problem with vertical , i need them in format like ١،٢،٣...

解决方案

There is a solution, but you'll have to use an undocumented feature, which will be documented at some point. You'll need to make this call sometime before you draw your chart.

   google.visualization.NumberFormat.useNativeCharactersIfAvailable(true);

This works with material charts prior to v46, and also in classic charts starting with v46. See this example: https://jsfiddle.net/dlaliberte/6k8vdgz7/

You may see some problems depending on what formatting options you also specify.

这篇关于我无法在Google图表中显示阿拉伯数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆