带有特殊字符的Google图表标题和列名称 [英] Google Chart title and column name with special characters
问题描述
我所看到的解决方案应该是此处。但是,当我尝试使用ASCII字符编码时,实际上会打印ASCII码。任何想法为什么?
The solution for what i am looking should be here. But, when i try to use ASCII character encodings, the ASCII code is actually printed. Any ideas why?
例如,我在Google图表选项上有以下代码:
For example, i have the following code on Google Chart Option:
var optionsTotUsers = {
'title': 'Transaçoes',
'backgroundColor': 'transparent',
'height': '300',
'legend': 'bottom',
'vAxis': { viewWindowMode: "explicit", viewWindow: { min: 0} }
};
这会在图表标题上打印实际的& ccedil。如果我用'ç'打印出来。
This prints the actual ç on the chart title. If i use the 'ç' it prints out �.
推荐答案
我想这会帮助你。使用UNICODE你可以添加特殊的字符到标题。用于特殊字符的UNICODE可在这里找到。您需要使用UNICODE如下。
I think this will help you.Using UNICODE you can add special characters to the title. The UNICODE for the special characters is available here.You need to use UNICODE as below.
var options = {
'title': 'Transa\u00E7oes',
'backgroundColor': 'transparent',
'height': '300',
'legend': 'bottom',
'vAxis': { viewWindowMode: "explicit", viewWindow: { min: 0} }
};
点击此处查看工作示例。 jqfaq.com
Click here to see the working sample. jqfaq.com
这篇关于带有特殊字符的Google图表标题和列名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!