mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-18 06:20:15 +00:00
更新文档
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
* [DataZoom 区域缩放](#DataZoom)
|
||||
* [Grid 网格](#Grid)
|
||||
* [Legend 图例](#Legend)
|
||||
* [Polar 极坐标](#Polar)
|
||||
* [Radar 雷达](#Radar)
|
||||
* [Series 系列](#Series)
|
||||
* [Serie-Line 折线图](#Serie-Line)
|
||||
@@ -21,9 +22,11 @@
|
||||
* [Serie-Heatmap 热力图](#Serie-Heatmap)
|
||||
* [Serie-Gauge 仪表盘](#Serie-Gauge)
|
||||
* [Serie-Ring 环形图](#Serie-Ring)
|
||||
* [Serie-Liquid 水位图](#Serie-Liquid)
|
||||
* [Settings 设置](#Settings)
|
||||
* [Theme 主题](#Theme)
|
||||
* [Tooltip 提示框](#Tooltip)
|
||||
* [Vessel 容器](#Vessel)
|
||||
* [Title 标题](#Title)
|
||||
* [VisualMap 视觉映射](#VisualMap)
|
||||
|
||||
@@ -138,6 +141,17 @@
|
||||
* `GetData(int index)`:获得指定索引的图例。
|
||||
* `GetIndex(string legendName)`:获得指定图例的索引。
|
||||
|
||||
## `Polar`
|
||||
|
||||
极坐标系组件。极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示直角坐标系网格。
|
||||
* `center`:极坐标的中心点。数组的第一项是横坐标,第二项是纵坐标。当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。
|
||||
* `radius`:极坐标的半径。
|
||||
* `backgroundColor`:极坐标的背景色,默认透明。
|
||||
|
||||
## `Radar`
|
||||
|
||||
* `shape`:雷达图绘制类型。
|
||||
@@ -221,6 +235,23 @@
|
||||
* `lineStyle`:指示器线条样式 [LineStyle](#LineStyle)。
|
||||
* `textStyle`:显示内容文本样式 [TextStyle](#TextStyle)。
|
||||
|
||||
## `Vessel`
|
||||
|
||||
容器组件。一般用于LiquidChart。
|
||||
|
||||
相关参数:
|
||||
|
||||
* `show`:是否显示容器组件。
|
||||
* `shape`:容器形状。
|
||||
* `shapeWidth`:容器的厚度。
|
||||
* `gap`:间隙。容器和液体的间隙。
|
||||
* `center`:中心点。数组的第一项是横坐标,第二项是纵坐标。当值为0-1之间时表示百分比,设置成百分比时表示图表宽高最小值的百分比。
|
||||
* `radius`:半径。
|
||||
* `smoothness`:开启或关闭缩放区域功能。
|
||||
* `backgroundColor`:背景色,默认透明。
|
||||
* `color`:容器颜色。当`autoColor`为`false`时生效。
|
||||
* `autoColor`:是否自动颜色。默认`true`。为`true`时颜色会和`serie`一致。
|
||||
|
||||
## `DataZoom`
|
||||
|
||||
区域缩放组件。用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。
|
||||
@@ -674,6 +705,25 @@
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。环形图的数据只有二维,`data[0]`表示当前值,`data[1]`表示最大值。
|
||||
|
||||
## `Serie-Liquid`
|
||||
|
||||
水位图系列。
|
||||
|
||||
* `show`:系列是否显示在图表上。
|
||||
* `type`:`Liquid`。
|
||||
* `name`:系列名称。用于 `tooltip` 的显示,`legend` 的图例筛选。
|
||||
* `vesselIndex`:水位图所使用的`vessel`组件的`index`。
|
||||
* `min`:最小值。
|
||||
* `max`:最大值。
|
||||
* `waveLength`:水波长。
|
||||
* `waveHeight`:水波高。
|
||||
* `waveSpeed`:水波移动速度。正数时左移,负数时右移。
|
||||
* `waveOffset`:水波偏移。
|
||||
* `itemStyle`:环形图的圆环样式,包括设置背景颜色和边框等 [ItemStyle](#ItemStyle)。
|
||||
* `label`:图形上的文本标签 [SerieLabel](#SerieLabel),可用于说明图形的一些数据信息,比如值,名称等。
|
||||
* `animation`:起始动画 [SerieAnimation](#SerieAnimation)。
|
||||
* `data`:系列中的数据项 [SerieData](#SerieData) 数组,可以设置`1`到`n`维数据。水位图的数据一般只有一个,表示当前水位值,用`max`设置最大水位值。
|
||||
|
||||
## `Settings`
|
||||
|
||||
全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。
|
||||
|
||||
@@ -16,6 +16,15 @@ A powerful, easy-to-use, configurable charting and data visualization library fo
|
||||
* support interactive operations such as data filtering, view zooming and detail display on PC and mobile terminals.
|
||||
* support 10,000-level big data rendering.
|
||||
|
||||
## Screenshot
|
||||
|
||||
<img src="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Doc/screenshot/xcharts-line.png" width="550" height="auto"/>
|
||||
<img src="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Doc/screenshot/xcharts-bar.png" width="550" height="auto"/>
|
||||
<img src="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Doc/screenshot/xcharts-pie.png" width="550" height="auto"/>
|
||||
<img src="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Doc/screenshot/xcharts-radar.png" width="550" height="auto"/>
|
||||
<img src="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Doc/screenshot/xcharts-scatter.png" width="550" height="auto"/>
|
||||
<img src="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/Doc/screenshot/xcharts-heatmap.png" width="550" height="auto"/>
|
||||
|
||||
## Environment
|
||||
|
||||
* Unity2017.4.27f1
|
||||
|
||||
@@ -55,8 +55,8 @@ namespace XCharts
|
||||
[SerializeField] [Range(0.5f, 10f)] private float m_Smoothness = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to show the grid in rectangular coordinate.
|
||||
/// 是否显示直角坐标系网格。
|
||||
/// Whether to show the vessel.
|
||||
/// 是否显示容器组件。
|
||||
/// </summary>
|
||||
public bool show
|
||||
{
|
||||
@@ -64,7 +64,8 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_Show, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 形状。
|
||||
/// The shape of vessel.
|
||||
/// 容器形状。
|
||||
/// </summary>
|
||||
public Shape shape
|
||||
{
|
||||
@@ -72,7 +73,7 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_Shape, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 容器宽度。
|
||||
/// 容器厚度。
|
||||
/// </summary>
|
||||
public float shapeWidth
|
||||
{
|
||||
@@ -80,7 +81,7 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_ShapeWidth, value)) SetVerticesDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 间隙
|
||||
/// 间隙。容器和液体的间隙。
|
||||
/// </summary>
|
||||
public float gap
|
||||
{
|
||||
@@ -89,7 +90,7 @@ namespace XCharts
|
||||
}
|
||||
/// <summary>
|
||||
/// 中心点。数组的第一项是横坐标,第二项是纵坐标。
|
||||
/// 当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。
|
||||
/// 当值为0-1之间时表示百分比,设置成百分比时表示图表宽高最小值的百分比。
|
||||
/// </summary>
|
||||
public float[] center
|
||||
{
|
||||
@@ -97,6 +98,7 @@ namespace XCharts
|
||||
set { if (value != null) { m_Center = value; SetAllDirty(); } }
|
||||
}
|
||||
/// <summary>
|
||||
/// The radius of vessel.
|
||||
/// 半径。
|
||||
/// </summary>
|
||||
public float radius
|
||||
@@ -105,6 +107,7 @@ namespace XCharts
|
||||
set { if (PropertyUtility.SetStruct(ref m_Radius, value)) SetAllDirty(); }
|
||||
}
|
||||
/// <summary>
|
||||
/// The smoothness of wave.
|
||||
/// 水波平滑度。
|
||||
/// </summary>
|
||||
public float smoothness
|
||||
|
||||
Reference in New Issue
Block a user