amchart pie中文配置解析

2023-11-25 23:48
文章标签 配置 中文 解析 pie amchart

本文主要是介绍amchart pie中文配置解析,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

<?xml version="1.0" encoding="UTF-8"?>
<!-- Value between [] brackets, for example [#FFFFFF] shows default value which is used if this parameter is not set -->
<!-- This means, that if you are happy with this value, you can delete this line at all and reduce file size         -->
<!-- value or explanation between () brackets shows the range or type of values you should use for this parameter    -->
<!-- the top left corner has coordinates x = 0, y = 0                                                                -->
<!-- "!" before x or y position (for example: <x>!20</x>) means that the coordinate will be calculated from the right side or the bottom -->

<settings> 
  <data_type>csv</data_type>                                  <!-- [xml] (xml / csv) 数据类型xml/csv-->
  <csv_separator>#</csv_separator>                            <!-- 如果使用csv作为数据的话,需要使用这个属性;表示文件数据分隔符,(平常以";"和","为主) [;] (string) csv file data separator (you need it only if you are using csv file for your data) -->     
  <skip_rows>0</skip_rows>                                    <!-- 如果使用的是csv数据,可以设置跳过几行再显示数据,默认为0表示csv中的数据全部显示,大于n(n>0);表示前面n行都不显示[0] (Number) if you are using csv data type, you can set the number of rows which should be skipped here -->
  <font></font>                                               <!-- 设置系统中的字体[Arial] (font name) use device fonts, such as Arial, Times New Roman, Tahoma, Verdana... -->
  <text_size></text_size>                                     <!-- 设置所有文本的大小,默认为11,具体的文本的字体大小也可以在下面的设置中设置[11] (Number) text size of all texts. Every text size can be set individually in the settings below -->
  <text_color></text_color>                                   <!-- 同上[#000000] (hex color code) main text color. Every text color can be set individually in the settings below-->
  <decimals_separator>.</decimals_separator>                   <!-- 小数分隔符,默认为[,]注:该属性只是用来显示,而在csv数据文件中,必须使用[.] (string) decimal separator. Note, that this is for displaying data only. Decimals in data xml file must be separated with a dot -->
  <thousands_separator></thousands_separator>                 <!-- 千位分隔符,默认为空[ ] (string) thousand separator. use "none" if you don't want to separate -->
  <digits_after_decimal>3</digits_after_decimal>               <!-- 如果百分数格式的数字,后面的小数位小于该属性的值,则在小数后面加0补充。如54.2%,该属性设置为3,那么显示的效果为54.200%。[] (Number) if your value has less digits after decimal then is set here, zeroes will be added -->
  <scientific_min></scientific_min>                           <!--设置科学记数法的最小值 [0.000001] If absolute value of your number is equal or less then scientific_min, this number will be formatted using scientific notation, for example: 0.0000023 -> 2.3e-6 -->
  <scientific_max></scientific_max>                           <!-- 设置科学计数法的最大值[1000000000000000] If absolute value of your number is equal or bigger then scientific_max, this number will be formatted using scientific notation, for example: 15000000000000000 -> 1.5e16 -->
  <reload_data_interval></reload_data_interval>               <!-- 数据多久一次被重载进来,时间以秒计算,默认为0表示不重载[0] (Number) how often data should be reloaded (time in seconds) -->
  <preloader_on_reload></preloader_on_reload>                 <!-- [false] (true / false) Whether to show preloaded when data or settings are reloaded -->
  <redraw></redraw>                                           <!-- 如果图形的在宽带和高度使用百分比来设置的,并且该属性设置为true,那么当图形的窗口大小改变的时候,那么图形也会重新绘画,改变大小。默认为false[false] (true / false) if your chart's width or height is set in percents, and redraw is set to true, the chart will be redrawn then screen size changes --> 
  <add_time_stamp></add_time_stamp>                           <!-- [false] (true / false) if true, a unique number will be added every time flash loads data. Mainly this feature is useful if you set reload _data_interval -->
  <precision>3</precision>                                     <!-- 表示逗号后面显示几位数字[2] (Number) shows how many numbers should be shown after comma for calculated values (percents) -->
  <exclude_invisible>false</exclude_invisible>                     <!-- [false] (true / false) whether to exclude invisible slices (where alpha=0) then calculating percent values or not -->
  <js_enabled></js_enabled>                                   <!-- 如果没有用flash,需要设置该属性为false[true] (true / false) In case you don't use any flash - JavaScript communication, you shuold set this setting to false - this will save some CPU and will disable the security warning message which appears when opening the chart from hard drive. -->
                                                                  
  <pie>
    <x></x>                                                   <!-- 设置pie图像x轴的位置;默认为整个框架的50%,([50%](Number(左边为起始点) / Number% / !Number(表示右边为起点开始) -->
    <y></y>                                                   <!-- 同上[45%](Number / Number% / !Number) -->
    <radius>90</radius>                                       <!-- 半径[25%] (Number / Number%) -->
    <inner_radius>40</inner_radius>                             <!-- 内部半径,即内部为空[0] (Number / Number%) the radius of the hole (if you want to have donut, use > 0) -->
    <height>11</height>                                        <!-- 高度,用于3D效果[0] (Number) pie height (for 3D effect) -->
    <angle>20</angle>                                          <!-- 倾斜角度[0] (0 - 90) lean angle (for 3D effect) -->
    <start_angle>190</start_angle>                               <!-- 第一个数据切片的角度[90] (0-360) angle of a first slice. This will work properly only if <pie><height> is set to 0. If height is > 0, then there can be two angles only: 90 and 270 -->
    <outline_color></outline_color>                           <!-- 轮廓的颜色[#FFFFFF] (hex color code) -->    
    <outline_alpha></outline_alpha>                           <!-- 轮廓透明度[0] (Number) -->
    <base_color></base_color>                                 <!-- 第一个切片的颜色[] (hex color code) color of first slice -->
    <brightness_step></brightness_step>                       <!-- 根据第一个切片的颜色,然后通过该属性的值,进行增减,或这递减,使用负数则往黑色靠拢。[20] (-100 - 100) if base_color is used, every next slice is filled with lighter by brightnessStep % color. Use negative value if you want to get darker colors -->
    <colors></colors>                                         <!-- [#FF0F00,#FF6600,#FF9E01,#FCD202,#F8FF01,#B0DE09,#04D215,#0D8ECF,#0D52D1,#2A0CD0,#8A0CCF,#CD0D74,#754DEB,#DDDDDD,#999999,#333333,#990000] (hex color codes separated by comas) -->
    <link_target>_blank</link_target>                               <!-- 如果在数据中,有设置了link,则该属性表示目标,[] (_blank, _top...) If pie slice has a link this is link target -->
    <alpha>100</alpha>                                           <!-- 设置透明度[100] (0 - 100) slices alpha. You can set individual alphas for every slice in data file. If you set alpha to 0 the slice will be inactive for mouse events and data labels will be hidden. This allows you to make not full pies and donuts. -->
    <hover_brightness></hover_brightness>                     <!-- 设置当鼠标移到切片时,切片是否变亮,或则变暗[0] (from -255 to 255) The pie slice may darken/lighten when the use rolls over it. The intensity may be set here -->
    <gradient></gradient>                                     <!-- 光线,使用线型,或放射状的来填充切片[] (linear/radial) Allows slices to be filled with gradient colors -->
    <gradient_ratio></gradient_ratio>                         <!-- 控制光线比率[0,-40] (Numbers from (-255 to 255) separated by commas) Controls the gradient ratio -->    
  </pie>
  
  <animation>              <!-- 设置动态效果 -->
    <start_time>2</start_time>                                <!-- 飞进来的时间[0] (Number) fly-in time in seconds. Leave 0 to appear instantly -->
    <start_effect>strong</start_effect>                       <!-- 飞进来的效果[bounce反弹的效果] (bounce, regular, strong) -->
    <start_radius></start_radius>                             <!-- 飞进来的半径,即从多远的地方飞过来的[500%] (Number / Number%) -->
    <start_alpha></start_alpha>                               <!-- 飞进来时的透明度。[0] (Number) -->
    <sequenced>true</sequenced>                               <!-- 飞进来的顺序,false为一起进来,true为按顺序[false] (true / false) Whether the slices should appear all together or one after another -->                
    <pull_out_on_click></pull_out_on_click>                   <!-- 点击一下切片是否弹出去[true] (true / false) whether to pull out slices when user clicks on them (or on legend entry) -->
    <pull_out_time>1.5</pull_out_time>                        <!-- 弹出去的时间[0] (number) pull-out time (then user clicks on the slice) -->
    <pull_out_effect>Bounce</pull_out_effect>                 <!-- 弹出去的效果[bounce] (bounce, regular, strong) -->
    <pull_out_radius></pull_out_radius>                       <!-- 弹出去的半径,即弹出去多远的位置[20%] (Number / Number%) how far pie slices should be pulled-out then user clicks on them -->
    <pull_out_only_one>false</pull_out_only_one>                   <!-- 是否只允许一个弹出去,一个弹出去,其他切片就收回[false] (true / false) if set to true, when you click on any slice, all other slices will be pushed in -->        
  </animation>
  
  <data_labels>              <!-- 数据标签 -->
    <radius></radius>                                         <!-- 数据标签的半径,使用负数则标签显示在图像上[20%] (Number / Number%) distance of the labels from the pie. Use negative value to place labels on the pie -->
    <text_color>#FFFFFF</text_color>                                 <!-- 标签颜色[text_color] (hex color code) -->
    <text_size>12</text_size>                                   <!-- 标签大小[text_size] (Number) -->
    <max_width></max_width>                                   <!-- 标签显示的最大宽度[120] (Number) -->
    <show>
       <![CDATA[{title}: {percents}%]]>                       <!-- 显示的格式[] ({value} {title} {percents} {description}) You can format any data label: {value} - will be replaced with value and so on. You can add your own text or html code too. -->
    </show>
    <show_lines></show_lines>                                 <!-- 是否显示线条[true] (true / false) whether to show lines from slices to data labels or not -->                                                                                              
    <line_color>#FFFFFF</line_color>                                 <!-- 线条颜色[#000000] (hex color code) -->
    <line_alpha>100</line_alpha>                                 <!-- 线条透明度[15] (Number) -->
    <hide_labels_percent></hide_labels_percent>               <!-- 当切片的值小于该属性的值,将隐藏图像中的标签内容[0] data labels of slices less then skip_labels_percent% will be hidden (to avoid label overlapping if there are many small pie slices)-->
    <avoid_overlapping></avoid_overlapping>                   <!-- 是否避免标签之间的重叠[true] (true / false) Whether to change data labels positions so that they wouldn't overlap or not -->                                       
  </data_labels>

  <group>
    <percent></percent>                                       <!-- 如果切片部分计算的百分比小于该属性值,当存在切片的百分比超过这里的值,则将被称为"组",即其他切片[0] (Number) if the calculated percent value of a slice is less than specified here, and there are more than one such slices, they can be grouped to "The others" slice-->
    <color></color>                                           <!-- 其他切片的颜色[] (hex color code) color of "The others" slice -->                                       
    <title></title>                                           <!-- [Others] title of "The others" slice -->
    <url></url>                                               <!-- 其他切片的url[] url of "The others" slice -->
    <description></description>                               <!-- 其他切片的描述[] description of "The others" slice -->        
    <pull_out></pull_out>                                     <!-- 是否推出其他切片[false] (true / false) whether to pull out the other slice or not --> 
  </group>

  <background>                                                <!-- BACKGROUND -->
    <color></color>                                           <!-- [#FFFFFF] (hex color code) Separate color codes with comas for gradient -->
    <alpha></alpha>                                           <!-- [0] (0 - 100) use 0 if you are using custom swf or jpg for background -->
    <border_color>ffffff</border_color>                             <!-- [#000000] (hex color code) -->
    <border_alpha>20</border_alpha>                             <!-- [0] (0 - 100) -->
    <file>../../chartDemo/bg.gif</file>                       <!-- 设置背景图片或swf文件的路径[] (filename) swf or jpg file of a background. Do not use progressive jpg file, it will be not visible with flash player 7 -->
                                                              <!-- The chart will look for this file in path folder (path is set in HTML) -->
  </background>
  
  <balloon>                                                   <!-- BALLOON 块状,即当鼠标移到图像上是否显示内容-->
    <enabled></enabled>                                     <!-- 是否显示块状[true] (true / false) -->
    <color>#ff00ff</color>                                           <!-- 块状的颜色,默认为空,当为空时,将使用切片的默认颜色作为块状的背景颜色[] (hex color code) balloon background color. If empty, slightly darker then current slice color will be used -->
    <alpha>20</alpha>                                         <!-- 块状的透明度[80] (0 - 100) -->
    <text_color>#55ff00</text_color>                                 <!-- 块状中的字体颜色[#FFFFFF] (hex color code) -->
    <text_size>13</text_size>                                   <!-- 文字大小[text_size] (Number) -->    
    <show>
       <![CDATA[{title}->{percents}%]]>                                           
    </show>                                                   <!-- 显示的内容格式[{title}: {percents}% ({value}) <br>{description}] ({value} {title} {percents} {description}) You can format any data label: {value} - will be replaced with value and so on. You can add your own text or html code too. -->
    <max_width></max_width>                                   <!-- 块状的最大宽度[220] (Number) The maximum width of a balloon -->
    <corner_radius>5</corner_radius>                           <!-- 块状边的半径[0] (Number) Corner radius of a balloon. If you set it > 0, the balloon will not display arrow -->
    <border_width>5</border_width>                             <!-- [0] (Number) -->
    <border_alpha></border_alpha>                             <!-- [balloon.alpha] (Number) -->
    <border_color>#0000ff</border_color>                             <!-- [balloon.color] (hex color code) -->   
  </balloon>
    
  <legend>                                                    <!-- 图片下面的说明LEGEND -->
    <enabled></enabled>                                       <!-- [true] (true / false) -->
    <x></x>                                                   <!-- 横坐标[5%] (Number / Number% / !Number) -->
    <y></y>                                                   <!-- 纵坐标[] (Number / Number% / !Number) if empty, will be placed below the pie -->
    <width></width>                                           <!-- 宽度[90%] (Number / Number%) -->
    <color>#f5f5f5</color>                                           <!-- 颜色[#FFFFFF] (hex color code) background color. Separate color codes with comas for gradient -->
    <max_columns></max_columns>                               <!-- 最大个数[] (Number) the maximum number of columns in the legend -->
    <alpha></alpha>                                           <!-- 透明度[0] (0 - 100) background alpha -->
    <border_color></border_color>                             <!-- 边框颜色[#000000] (hex color code) border color -->
    <border_alpha>20</border_alpha>                           <!-- 边框透明度[0] (0 - 100) border alpha -->
    <text_color>#f9f22f</text_color>                          <!--文字颜色 [text_color] (hex color code) -->   
    <text_size>12</text_size>                                 <!-- 文字大小[text_size] (Number) -->
    <spacing>8</spacing>                                      <!-- 字体和key之间的距离[10] (Number) vertical and horizontal gap between legend entries -->
    <margins></margins>                                       <!-- [0] (Number) legend margins (space between legend border and legend entries, recommended to use only if legend border is visible or background color is different from chart area background color) -->
    <reverse_order>true</reverse_order>                       <!-- 是否反向的对说明进行排序[false] (true / false) whether to sort legend entries in a reverse order -->
    <align>center</align>                                     <!-- 说明的位置[left] (left / center / right) alignment of legend entries -->
    <key>                                                     <!-- 说明中字体旁边的方块,称为key;KEY (the color box near every legend entry) -->
      <size></size>                                           <!-- [16] (Number) key size-->
      <border_color>ffffff</border_color>                           <!-- [] (hex color code) leave empty if you don't want to have border -->
    </key>
    <values>                                                  <!-- VALUES -->          
      <enabled>false</enabled>                                     <!-- 是否将value值也显示出来[false] (true / false) whether to show values near legend entries or not -->
      <width></width>                                         <!-- [] (Number) width of value text (use it if you want to align all values to the right, othervise leave empty) -->
      <text><![CDATA[]]></text>                               <!-- [{percents}%] ({value} {percents}) -->
     </values>    
  </legend>  
  
  <export_as_image>                                           <!-- export_as_image feature works only on a web server -->
    <file></file>                                             <!-- [] (filename) if you set filename here, context menu (then user right clicks on flash movie) "Export as image" will appear. This will allow user to export chart as an image. Collected image data will be posted to this file name (use ampie/export.php or ampie/export.aspx) -->
    <target></target>                                         <!-- [] (_blank, _top ...) target of a window in which export file must be called -->
    <x></x>                                                   <!-- [0] (Number / Number% / !Number) x position of "Collecting data" text -->
    <y></y>                                                   <!-- [] (Number / Number% / !Number) y position of "Collecting data" text. If not set, will be aligned to the bottom of flash movie -->
    <color></color>                                           <!-- [#BBBB00] (hex color code) background color of "Collecting data" text -->
    <alpha></alpha>                                           <!-- [0] (0 - 100) background alpha -->
    <text_color></text_color>                                 <!-- [text_color] (hex color code) -->
    <text_size></text_size>                                   <!-- [text_size] (Number) -->
  </export_as_image>
  
  <error_messages>                                            <!-- "error_messages" settings will be applied for all error messages except the one which is showed if settings file wasn't found -->
    <enabled></enabled>                                       <!-- [true] (true / false) -->
    <x></x>                                                   <!-- [] (Number / Number% / !Number) x position of error message. If not set, will be aligned to the center -->
    <y></y>                                                   <!-- [] (Number / Number% / !Number) y position of error message. If not set, will be aligned to the center -->
    <color></color>                                           <!-- [#BBBB00] (hex color code) background color of error message. Separate color codes with comas for gradient -->
    <alpha></alpha>                                           <!-- [100] (0 - 100) background alpha -->
    <text_color></text_color>                                 <!-- [#FFFFFF] (hex color code) -->
    <text_size></text_size>                                   <!-- [text_size] (Number) -->
  </error_messages>    
  
  <strings>
    <no_data></no_data>                                       <!-- [No data for selected period] (text) if data is missing, this message will be displayed -->
    <export_as_image></export_as_image>                       <!-- [Export as image] (text) text for right click menu -->
    <collecting_data></collecting_data>                       <!-- [Collecting data] (text) this text is displayed while exporting chart to an image -->
  </strings>  
  
  <context_menu>                                              <!-- context menu allows you to controll right-click menu items. You can add custom menu items to create custom controls -->                                                              
                                                              <!-- "function_name" specifies JavaScript function which will be called when user clicks on this menu. You can pass variables, for example: function_name="alert('something')" -->
                                                              <!-- "title" sets menu item text. Do not use for title: Show all, Zoom in, Zoom out, Print, Settings... -->
                                                              <!-- you can have any number of custom menus. Uncomment the line below to enable this menu and add apropriate JS function to your html file. -->
     
     <!-- <menu function_name="printChart" title="Print chart"></menu> -->
     
     <default_items>
       <zoom></zoom>                                          <!-- [false] (true / false) to show or not flash players zoom menu -->
       <print></print>                                        <!-- [true] (true / false) to show or not flash players print menu -->
     </default_items>
  </context_menu>  
  
  <labels>                                                    <!-- LABELS 图像标题-->
                                                              <!-- you can add as many labels as you want -->
                                                              <!-- labels can also be added in data xml file, using exactly the same structure like it is here -->
    <label lid="0">
      <x>0</x>                                                <!-- [0] (Number / Number% / !Number) -->
      <y>300</y>                                               <!-- [0] (Number / Number% / !Number) -->
      <rotate>true</rotate>                                  <!-- 是否进行旋转,false为横向显示,true为纵向显示[false] (true / false) -->
      <width></width>                                         <!-- [] (Number / Number%) if empty, will stretch from left to right untill label fits -->
      <align>center</align>                                   <!-- [left] (left / center / right) -->  
      <text_color>#8f88ff</text_color>                               <!-- [text_color] (hex color code) button text color -->
      <text_size>18</text_size>                               <!-- [text_size](Number) button text size -->
      <text>                                                  <!-- [] (text) html tags may be used (supports <b>, <i>, <u>, <font>, <a href="">, <br/>. Enter text between []: <![CDATA[your <b>bold</b> and <i>italic</i> text]]>-->
        <![CDATA[<b>My First Pie Chart</b>]]>
      </text>        
    </label>
  </labels>
  
 <!-- DATA can also be set in settings file. Just place data in CSV or XML format between <data></data> -->
 
 <!--<data>
 </data> -->  
</settings>

这篇关于amchart pie中文配置解析的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/424813

相关文章

MySQL数据库双机热备的配置方法详解

《MySQL数据库双机热备的配置方法详解》在企业级应用中,数据库的高可用性和数据的安全性是至关重要的,MySQL作为最流行的开源关系型数据库管理系统之一,提供了多种方式来实现高可用性,其中双机热备(M... 目录1. 环境准备1.1 安装mysql1.2 配置MySQL1.2.1 主服务器配置1.2.2 从

Java中Redisson 的原理深度解析

《Java中Redisson的原理深度解析》Redisson是一个高性能的Redis客户端,它通过将Redis数据结构映射为Java对象和分布式对象,实现了在Java应用中方便地使用Redis,本文... 目录前言一、核心设计理念二、核心架构与通信层1. 基于 Netty 的异步非阻塞通信2. 编解码器三、

Java HashMap的底层实现原理深度解析

《JavaHashMap的底层实现原理深度解析》HashMap基于数组+链表+红黑树结构,通过哈希算法和扩容机制优化性能,负载因子与树化阈值平衡效率,是Java开发必备的高效数据结构,本文给大家介绍... 目录一、概述:HashMap的宏观结构二、核心数据结构解析1. 数组(桶数组)2. 链表节点(Node

Java 虚拟线程的创建与使用深度解析

《Java虚拟线程的创建与使用深度解析》虚拟线程是Java19中以预览特性形式引入,Java21起正式发布的轻量级线程,本文给大家介绍Java虚拟线程的创建与使用,感兴趣的朋友一起看看吧... 目录一、虚拟线程简介1.1 什么是虚拟线程?1.2 为什么需要虚拟线程?二、虚拟线程与平台线程对比代码对比示例:三

一文解析C#中的StringSplitOptions枚举

《一文解析C#中的StringSplitOptions枚举》StringSplitOptions是C#中的一个枚举类型,用于控制string.Split()方法分割字符串时的行为,核心作用是处理分割后... 目录C#的StringSplitOptions枚举1.StringSplitOptions枚举的常用

Python函数作用域与闭包举例深度解析

《Python函数作用域与闭包举例深度解析》Python函数的作用域规则和闭包是编程中的关键概念,它们决定了变量的访问和生命周期,:本文主要介绍Python函数作用域与闭包的相关资料,文中通过代码... 目录1. 基础作用域访问示例1:访问全局变量示例2:访问外层函数变量2. 闭包基础示例3:简单闭包示例4

Linux云服务器手动配置DNS的方法步骤

《Linux云服务器手动配置DNS的方法步骤》在Linux云服务器上手动配置DNS(域名系统)是确保服务器能够正常解析域名的重要步骤,以下是详细的配置方法,包括系统文件的修改和常见问题的解决方案,需要... 目录1. 为什么需要手动配置 DNS?2. 手动配置 DNS 的方法方法 1:修改 /etc/res

MyBatis延迟加载与多级缓存全解析

《MyBatis延迟加载与多级缓存全解析》文章介绍MyBatis的延迟加载与多级缓存机制,延迟加载按需加载关联数据提升性能,一级缓存会话级默认开启,二级缓存工厂级支持跨会话共享,增删改操作会清空对应缓... 目录MyBATis延迟加载策略一对多示例一对多示例MyBatis框架的缓存一级缓存二级缓存MyBat

mysql8.0.43使用InnoDB Cluster配置主从复制

《mysql8.0.43使用InnoDBCluster配置主从复制》本文主要介绍了mysql8.0.43使用InnoDBCluster配置主从复制,文中通过示例代码介绍的非常详细,对大家的学习或者... 目录1、配置Hosts解析(所有服务器都要执行)2、安装mysql shell(所有服务器都要执行)3、

前端缓存策略的自解方案全解析

《前端缓存策略的自解方案全解析》缓存从来都是前端的一个痛点,很多前端搞不清楚缓存到底是何物,:本文主要介绍前端缓存的自解方案,文中通过代码介绍的非常详细,需要的朋友可以参考下... 目录一、为什么“清缓存”成了技术圈的梗二、先给缓存“把个脉”:浏览器到底缓存了谁?三、设计思路:把“发版”做成“自愈”四、代码