FusionCharts简单教程(五)-----FusionCharts中的那些特殊符号

       在FusionCharts中有些特殊字符,我们需要进行编码操作才能够使用,否则就无法正常显示。

欧元符号

      在FusionCharts里显示“€”,你需要用“%80”来替换它。如下:

<graph decimalPrecision='0' numberPrefix='%80 '>
 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='John'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='420'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Mary'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='295'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

  <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Tom'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='523'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

</graph>

      上面的代码会在数字前面都加上“€”。

英镑符号

      在FusionCharts里显示“£”,你需要用“%A3”来替换它。如下:

<graph decimalPrecision='0' numberPrefix='%A3 '>
 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='John'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='420'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Mary'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='295'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Tom'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='523'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

</graph>

       上面的代码会在数字前面都加上“£”。

人民币符号

       在FusionCharts里显示“¥”,你需要用“%A5”来替换它。如下:

<graph decimalPrecision='0' numberPrefix='%A5 ' >
 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='John'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='420'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Mary'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='295'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Tom'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='523'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

</graph>

      上面的代码会在数字前面都加上“¥”。

分符号

      在FusionCharts里显示“¢”,你需要用“%A2”来替换它。如下:

<graph decimalPrecision='0' numberSuffix='%A2 '>
  <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='John'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='420'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

  <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Mary'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='295'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span> 

  <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Tom'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='523'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span> 

</graph>

      上面的代码会在数字后面都加上“¢”。

百分号

      在FusionCharts里显示“%”,你需要用“%25”来替换它。如下:

<graph decimalPrecision='0' numberSuffix='%25 '>
<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='John'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='42'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Mary'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='29'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Tom'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='52'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

</graph>

     上面的代码会在数字后面都加上“%”。

&符号

      在FusionCharts里显示“&”,你需要用“&”来替换它。如下:

<graph caption='Total of 2003 & 2004' decimalPrecision='0' >
<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='John'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='420'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Mary'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='295'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Tom'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='523'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

</graph>

      上面的代码标题显示为“Total of 2003 & 2004”。

>符号

      在FusionCharts里显示“>”,你需要用“>”来替换它。如下:

<graph decimalprecision='0' >
 <span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='0'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='420'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='0-10'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='295'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='&gt; 10'</span><span style="color: rgb(255,0,0)"> value</span><span style="color: rgb(0,0,255)">='523'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

</graph>

    上面的代码最后一个数字显示为“>10”。
    如果要显示“<”,你可能以为用“<”就可以了,事实是不可能的。我还没试验出怎么才能显示“<”,也许没有这个必要。

单引号

      在FusionCharts里显示“'”,你需要用“'”来替换它。如下:

<graph decimalPrecision='0' >
<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='John'</span><span style="color: rgb(255,0,0)">s Count' value</span><span style="color: rgb(0,0,255)">='420'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='AFD8F8'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Mary'</span><span style="color: rgb(255,0,0)">s Count' value</span><span style="color: rgb(0,0,255)">='295'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='F6BD0F'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

<span style="color: rgb(0,0,255)">&lt;</span><span style="color: rgb(128,0,0)">set </span><span style="color: rgb(255,0,0)">name</span><span style="color: rgb(0,0,255)">='Tom'</span><span style="color: rgb(255,0,0)">s Count' value</span><span style="color: rgb(0,0,255)">='523'</span><span style="color: rgb(255,0,0)"> color</span><span style="color: rgb(0,0,255)">='8BBA00'</span> <span style="color: rgb(0,0,255)">/&gt;</span>

</graph>

     上面的代码显示为“John's Count”。
     如果你想要显示双引号,直接使用就可以了,前提是你的属性值是用单引号括起来的。如果你的属性值是用双引号括起来的,你要显示单引号,也可以直接使用,而不必用“'”来替换它。

posted @ 2014-04-13 13:25  chenssy  阅读(1011)  评论(0编辑  收藏  举报