2021-01-20 20:30:39 +08:00
|
|
|
|
<p align="center">
|
|
|
|
|
|
<a href="">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="" alt="" width="" height=""></img>
|
2021-01-20 20:30:39 +08:00
|
|
|
|
</a>
|
|
|
|
|
|
</p>
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<h2 align="center">XCharts</h2>
|
2021-01-20 20:30:39 +08:00
|
|
|
|
<p align="center">
|
|
|
|
|
|
A powerful, easy-to-use, configurable charting and data visualization library for Unity.
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<br/>
|
2022-05-24 13:39:19 +08:00
|
|
|
|
Unity数据可视化图表插件。
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<br/>
|
2022-11-19 21:24:08 +08:00
|
|
|
|
<a href="README-en.md">English README</a>
|
2021-01-20 20:30:39 +08:00
|
|
|
|
</p>
|
2021-01-25 09:12:22 +08:00
|
|
|
|
<p align="center">
|
2022-03-20 20:58:17 +08:00
|
|
|
|
<a href="https://github.com/XCharts-Team/XCharts/blob/master/LICENSE">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/github/license/XCharts-Team/XCharts"></img>
|
2021-01-25 09:12:22 +08:00
|
|
|
|
</a>
|
2022-03-20 20:58:17 +08:00
|
|
|
|
<a href="https://github.com/XCharts-Team/XCharts/releases">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/github/v/release/XCharts-Team/XCharts?include_prereleases"></img>
|
2021-01-25 09:12:22 +08:00
|
|
|
|
</a>
|
2023-03-09 21:31:26 +08:00
|
|
|
|
<a href="https://github.com/XCharts-Team/XCharts">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/github/repo-size/monitor1394/unity-ugui-xcharts"></img>
|
2021-01-25 09:12:22 +08:00
|
|
|
|
</a>
|
2023-03-09 21:31:26 +08:00
|
|
|
|
<a href="https://github.com/XCharts-Team/XCharts">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/github/languages/code-size/monitor1394/unity-ugui-xcharts"></img>
|
2022-01-05 21:40:48 +08:00
|
|
|
|
</a>
|
2023-03-09 21:31:26 +08:00
|
|
|
|
<a href="https://xcharts-team.github.io/docs/tutorial01">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Unity-5.6+-green"></img>
|
2021-01-25 09:12:22 +08:00
|
|
|
|
</a>
|
2023-03-09 21:31:26 +08:00
|
|
|
|
<a href="https://xcharts-team.github.io/docs/tutorial01">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/TextMeshPro-YES-green"></img>
|
2021-01-25 09:12:22 +08:00
|
|
|
|
</a>
|
|
|
|
|
|
</p>
|
2021-07-24 09:31:40 +08:00
|
|
|
|
<p align="center">
|
2023-03-09 21:31:26 +08:00
|
|
|
|
<a href="https://github.com/XCharts-Team/XCharts/stargazers">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/github/stars/XCharts-Team/XCharts?style=social"></img>
|
2021-07-24 09:31:40 +08:00
|
|
|
|
</a>
|
2023-03-09 21:31:26 +08:00
|
|
|
|
<a href="https://github.com/XCharts-Team/XCharts/forks">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/github/forks/XCharts-Team/XCharts?style=social"></img>
|
2021-07-24 09:31:40 +08:00
|
|
|
|
</a>
|
2023-03-09 21:31:26 +08:00
|
|
|
|
<a href="https://github.com/XCharts-Team/XCharts/issues">
|
2022-11-01 07:03:14 +08:00
|
|
|
|
<img src="https://img.shields.io/github/issues-closed/XCharts-Team/XCharts?color=green&label=%20%20%20%20issues&logoColor=green&style=social"></img>
|
2021-07-24 09:31:40 +08:00
|
|
|
|
</a>
|
|
|
|
|
|
</p>
|
2021-01-20 20:30:39 +08:00
|
|
|
|
|
2023-09-12 08:03:19 +08:00
|
|
|
|

|
|
|
|
|
|
|
2022-10-28 07:20:20 +08:00
|
|
|
|
一款基于`UGUI`的功能强大、简单易用的数据可视化图表插件。支持`折线图`、`柱状图`、`饼图`、`雷达图`、`散点图`、`热力图`、`环形图`、`K线图`、`极坐标`、`平行坐标`等十多种内置图表,以及`3D饼图`、`3D柱图`、`3D金字塔`、`漏斗图`、`仪表盘`、`水位图`、`象形柱图`、`甘特图`、`矩形树图`等扩展图表。
|
2022-03-09 08:23:15 +08:00
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
[XCharts 官方主页](https://xcharts-team.github.io)
|
|
|
|
|
|
[XCharts 在线示例](https://xcharts-team.github.io/examples)
|
2022-12-01 21:29:38 +08:00
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
[XCharts 教程:5分钟上手 XCharts](Documentation~/zh/tutorial01.md)
|
|
|
|
|
|
[XCharts API文档](Documentation~/zh/api.md)
|
|
|
|
|
|
[XCharts 问答](Documentation~/zh/faq.md)
|
|
|
|
|
|
[XCharts 配置项手册](Documentation~/zh/configuration.md)
|
|
|
|
|
|
[XCharts 更新日志](Documentation~/zh/changelog.md)
|
|
|
|
|
|
[XCharts 订阅服务](Documentation~/zh/support.md)
|
2022-03-24 21:48:53 +08:00
|
|
|
|
|
2022-03-20 18:52:50 +08:00
|
|
|
|
## 特性
|
|
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- __纯代码绘制__:图表完全纯代码绘制,无需额外的贴图和Shader资源。
|
|
|
|
|
|
- __可视化配置__:参数可视化配置,效果实时预览,也支持运行时代码动态修改配置和数据。
|
|
|
|
|
|
- __高自由定制__:支持从主题和配置参数上任意调整;支持代码自定义绘制,自定义回调以及自定义实现图表。
|
|
|
|
|
|
- __多内置图表__:支持线图、状图、饼图、雷达图、散点图、热力图、环形图、K线图、极坐标、平行坐标等多种内置图表。
|
2023-08-22 23:14:05 +08:00
|
|
|
|
- __多扩展图表__:支持3D柱图、3D饼图、漏斗图、金字塔、仪表盘、水位图、象形柱图、甘特图、矩形树图等多种扩展图表。
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- __多扩展功能__:支持表格、统计数值等扩展UI组件。
|
|
|
|
|
|
- __多图表组合__:支持内置图表的任意组合,同一图中可同时显示多个相同或不同类型的图表。
|
|
|
|
|
|
- __多种坐标系__:支持直角坐标系、极坐标系、单轴等多种坐标系。
|
|
|
|
|
|
- __丰富的组件__:支持标题、图例、提示框、标线、标域、数据区域缩放、视觉映射等常用组件。
|
2023-10-11 08:32:48 +08:00
|
|
|
|
- __多样式线图__:支持直线图、曲线图、虚线图、面积图、阶梯线图等多种线图。
|
|
|
|
|
|
- __多样式柱图__:支持并列柱图、堆叠柱图、堆积百分比柱图、斑马柱图、胶囊柱图等多种柱状图。
|
|
|
|
|
|
- __多样式饼图__:支持环形图、玫瑰图、环形玫瑰图等多种饼图。
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- __丰富的线条__:支持实线、曲线、阶梯线、虚线、点线、点划线、双点划线等线条。
|
|
|
|
|
|
- __自定义绘制__:支持自定义图表内容绘制,提供绘制点、线、面等其他图形的强大的绘图API。
|
|
|
|
|
|
- __大数据绘制__:支持万级大数据量绘制;支持采样绘制;特殊的简化图表支持更优的性能。
|
|
|
|
|
|
- __自定义主题__:支持主题定制、导入和导出,内置明暗两种默认主题。
|
2023-08-22 23:14:05 +08:00
|
|
|
|
- __动画和交互__:支持渐入动画、渐出动画、变更动画、新增动画、交互动画等多种动画;支持多平台的数据筛选、视图缩放、细节展示等交互操作。
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- __第三方扩展__:支持接入`TexMeshPro`和`New Input System`。
|
|
|
|
|
|
- __版本和兼容__:支持所有`5.6`以上的`Unity`版本;支持全平台运行。
|
2022-03-27 12:49:20 +08:00
|
|
|
|
|
2022-07-07 07:08:02 +08:00
|
|
|
|
## 截图
|
|
|
|
|
|
|
2022-11-19 21:24:08 +08:00
|
|
|
|

|
2022-07-07 07:08:02 +08:00
|
|
|
|
|
2022-11-19 21:24:08 +08:00
|
|
|
|

|
2022-07-07 07:08:02 +08:00
|
|
|
|
|
2022-03-27 12:49:20 +08:00
|
|
|
|
## 注意
|
|
|
|
|
|
|
2023-10-11 08:32:48 +08:00
|
|
|
|
- `XCharts3.0` 不完全兼容 `XCharts2.0` 版本,升级`3.0`时,部分代码和配置可能需要重新调整。建议旧项目可以继续使用`XCharts2.0`,新项目推荐使用`XCharts3.0`。
|
2023-04-01 23:05:47 +08:00
|
|
|
|
- `XCharts2.0` 进入维护阶段,后续只修复严重`bug`,原则上不再加新功能。
|
2022-05-23 08:23:58 +08:00
|
|
|
|
- `XCharts` 理论上支持`Unity 5.6`及以上版本,但由于版本测试有限难免疏漏,发现版本兼容问题可提`Issue`。
|
2023-04-01 23:05:47 +08:00
|
|
|
|
- 本仓库只包含`XCharts`源码,不包含`Demo`示例部分。需要查看`Demo`示例源码请到[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo)仓库。也可以在浏览器查看`WebGL`下的运行效果 [在线Demo](https://xcharts-team.github.io/examples/) 。
|
2022-03-20 18:52:50 +08:00
|
|
|
|
|
2023-10-11 08:32:48 +08:00
|
|
|
|
## 仓库
|
|
|
|
|
|
|
|
|
|
|
|
- [XCharts](https://github.com/XCharts-Team/XCharts):XCharts核心功能,完全免费。
|
|
|
|
|
|
- [XCharts-Daemon](https://github.com/XCharts-Team/XCharts-Daemon):XCharts的守护程序,用于确保XCharts更新时的编译正常。非必须,但建议使用。
|
|
|
|
|
|
- [XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo):XCharts的官方示例,不包含扩展图表部分。订阅VIP的用户购买扩展图表后,可加入对应图表的示例。
|
|
|
|
|
|
- [XCharts-Pro](https://github.com/XCharts-Team/XCharts-Pro):XCharts完全版,包含所有扩展图表和扩展组件。订阅SVIP可访问。
|
|
|
|
|
|
- [XCharts-Pro-Demo](https://github.com/XCharts-Team/XCharts-Pro-Demo):XCharts完全版官方示例,包含所有扩展图表和扩展组件的示例。订阅SVIP可访问。
|
|
|
|
|
|
- [XCharts-UI](https://github.com/XCharts-Team/XCharts-UI):XCharts的扩展UI组件。订阅VIP可访问。
|
|
|
|
|
|
- [XCharts-Bar3DChart](https://github.com/XCharts-Team/XCharts-Bar3DChart):XCharts扩展图表:3D柱图。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-FunnelChart](https://github.com/XCharts-Team/XCharts-FunnelChart):XCharts扩展图表:漏斗图。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-GanttChart](https://github.com/XCharts-Team/XCharts-GanttChart):XCharts扩展图表:甘特图。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-GaugeChart](https://github.com/XCharts-Team/XCharts-GaugeChart):XCharts扩展图表:仪表盘。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-LiquidChart](https://github.com/XCharts-Team/XCharts-LiquidChart):XCharts扩展图表:水位图。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-PictorialBarChart](https://github.com/XCharts-Team/XCharts-PictorialBarChart):XCharts扩展图表:象形住图。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-Pie3DChart](https://github.com/XCharts-Team/XCharts-Pie3DChart):XCharts扩展图表:3D饼图。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-PyramidChart](https://github.com/XCharts-Team/XCharts-PyramidChart):XCharts扩展图表:3D金字塔。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-TreemapChart](https://github.com/XCharts-Team/XCharts-TreemapChart):XCharts扩展图表:矩形树图。订阅VIP后可单独购买。
|
|
|
|
|
|
- [XCharts-Bar3DChart-Demo](https://github.com/XCharts-Team/XCharts-Bar3DChart-Demo):3D柱图的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-FunnelChart-Demo](https://github.com/XCharts-Team/XCharts-FunnelChart-Demo):漏斗图的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-GanttChart-Demo](https://github.com/XCharts-Team/XCharts-GanttChart-Demo):甘特图的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-GaugeChart-Demo](https://github.com/XCharts-Team/XCharts-GaugeChart-Demo):仪表盘的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-LiquidChart-Demo](https://github.com/XCharts-Team/XCharts-LiquidChart-Demo):水位图的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-PictorialBarChart-Demo](https://github.com/XCharts-Team/XCharts-PictorialBarChart-Demo):象形住图的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-Pie3DChart-Demo](https://github.com/XCharts-Team/XCharts-Pie3DChart-Demo):3D饼图的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-PyramidChart-Demo](https://github.com/XCharts-Team/XCharts-PyramidChart-Demo):3D金字塔的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
- [XCharts-TreemapChart-Demo](https://github.com/XCharts-Team/XCharts-TreemapChart-Demo):矩形树图的示例。订阅VIP可访问,可导入XCharts-Demo使用。
|
|
|
|
|
|
|
2022-03-28 19:28:39 +08:00
|
|
|
|
## 使用
|
2022-03-27 12:49:20 +08:00
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- 导入`XCharts`的`unitypackage`或者源码到项目。
|
|
|
|
|
|
- 在`Hierarchy`视图下右键选择`XCharts->LineChart`,即可创建一个默认的折线图。
|
|
|
|
|
|
- 在`Inspector`视图可以调整各个组件的参数,`Game`视图可看到实时效果。
|
|
|
|
|
|
- 更多细节,请看[【XCharts教程:5分钟上手教程】](Documentation~/zh/tutorial01.md)
|
2022-10-27 07:27:07 +08:00
|
|
|
|
- 首次使用,建议先认真看一遍教程。
|
2022-05-22 22:17:38 +08:00
|
|
|
|
|
2022-10-27 07:27:07 +08:00
|
|
|
|
## 分支
|
|
|
|
|
|
|
2022-10-28 07:20:20 +08:00
|
|
|
|
- `master`:开发分支。最新的修改和新功能都先提交到`master`分支,一段时间后再从`master`分支`merge`到`3.0`分支,并发布`release`版本。
|
|
|
|
|
|
- `3.0`:XCharts 3.0的稳定分支。一般一个月一更新,从`master`分支`merge`最新改动过来,并发布`release`版本。
|
|
|
|
|
|
- `2.0`:XCharts 2.0的稳定分支。带Demo,目前基本不再维护,仅修改严重bug。
|
2022-10-27 07:27:07 +08:00
|
|
|
|
- `2.0-upm`:XCharts 2.0的稳定UMP分支。不带Demo,只包含Package部分,专门给UMP用,不再维护。
|
|
|
|
|
|
- `1.0`:XCharts 1.0的稳定分支。带Demo,不再维护。
|
|
|
|
|
|
- `1.0-upm`:XCharts 1.0的稳定UMP分支。不带Demo,不再维护。
|
2022-07-07 07:42:53 +08:00
|
|
|
|
|
2022-05-22 22:17:38 +08:00
|
|
|
|
## FAQ
|
|
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- `XCharts`可以免费使用吗?
|
2022-05-23 08:23:58 +08:00
|
|
|
|
答:`XCharts`使用`MIT`协议,可以免费使用。也可以订阅`VIP`享受更多增值服务。
|
2022-05-22 22:17:38 +08:00
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- `XCharts`支持代码动态添加和修改数据吗?支持从`Excel`或数据库中获取数据吗?
|
2023-04-01 23:05:47 +08:00
|
|
|
|
答:`XCharts`提供了各种数据操作的接口,支持代码动态修改配置,添加和修改数据,但数据来源需要自己解析和获取,再调用`XCharts`的接口添加到图表。
|
2022-05-22 22:17:38 +08:00
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- `XCharts`除了用在`Unity`平台,还能用在`Winform`或`WPF`等平台吗?
|
|
|
|
|
|
答:`XCharts`只支持在`Unity`平台使用。理论上任何支持`UGUI`的`Unity`版本都能运行`XCharts`。
|
2022-03-27 12:49:20 +08:00
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- 锯齿怎么解决?支持多大量级的数据?
|
2022-11-19 21:24:08 +08:00
|
|
|
|
答:`XCharts`是基于`UGUI`实现的,所以`UGUI`中碰到的问题,在`XCharts`中也会存在。比如锯齿问题,比如`Mesh`顶点数超`65535`的问题。这两个问题的解决可参考[问答16](Documentation~/zh/faq.md)和[问答27](Documentation~/zh/faq.md)。
|
2022-11-01 07:03:14 +08:00
|
|
|
|
由于`Mesh`的`65535`顶点数的限制,目前`XCharts`的单条`Line`支持约`2万`的数据量,当然开启采样可以支持更多数据的绘制,但同时也会更消耗CPU。
|
2022-09-26 08:38:33 +08:00
|
|
|
|
|
2022-03-20 18:52:50 +08:00
|
|
|
|
## Licenses
|
|
|
|
|
|
|
2022-11-19 21:24:08 +08:00
|
|
|
|
- [MIT License](https://github.com/XCharts-Team/XCharts/blob/master/LICENSE.md)
|
2022-10-27 07:27:07 +08:00
|
|
|
|
- 可免费商用,可二次开发
|
2023-08-21 23:16:05 +08:00
|
|
|
|
- 扩展图表和高级功能部分需单独购买授权
|
2022-07-07 07:42:53 +08:00
|
|
|
|
|
|
|
|
|
|
## 日志
|
|
|
|
|
|
|
2022-11-19 21:24:08 +08:00
|
|
|
|
- [更新日志](Documentation~/zh/changelog.md)
|
2022-07-07 07:42:53 +08:00
|
|
|
|
|
2023-08-21 23:16:05 +08:00
|
|
|
|
## 订阅
|
|
|
|
|
|
|
2023-10-11 08:32:48 +08:00
|
|
|
|
- `XCharts`核心库是开源的,可免费使用的。在此基础上,我们也提供多种订阅服务以满足不同用户的需求,订阅详情[☞ 请看这里](Documentation~/zh/support.md)。
|
|
|
|
|
|
- 订阅不是必须的,不影响`XCharts`的核心功能使用。
|
|
|
|
|
|
- 订阅是按年付费,订阅到期后,不要求必须续订,但中断订阅期间无法享受技术支持等服务。如需继续服务,可从当日起续订即可。
|
2023-08-21 23:16:05 +08:00
|
|
|
|
|
2022-03-20 18:52:50 +08:00
|
|
|
|
## 其他
|
|
|
|
|
|
|
2022-10-27 07:27:07 +08:00
|
|
|
|
- 邮箱:`monitor1394@gmail.com`
|
|
|
|
|
|
- QQ群:XCharts交流群(`202030963`)
|
2023-10-11 08:32:48 +08:00
|
|
|
|
- VIP群:XCharts VIP群(`867291970`)
|
2023-04-01 23:05:47 +08:00
|
|
|
|
- 捐助、合作、订阅和技术支持:[☞ 看这里](Documentation~/zh/support.md)
|