Skip to content

Commit

Permalink
3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1394 committed May 31, 2022
1 parent 9549159 commit 6e87f82
Show file tree
Hide file tree
Showing 13 changed files with 268 additions and 63 deletions.
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# 更新日志

[master](#master)
[v3.0.0](#v3.0.0)
[v3.0.0-preivew9](#v3.0.0-preivew9)
[v3.0.0-preivew8](#v3.0.0-preivew8)
[v3.0.0-preivew7](#v3.0.0-preivew7)
Expand Down Expand Up @@ -52,7 +53,27 @@

## master

* (2022.05.06) 修复代码动态创建图表异常的问题
## v3.0.0

* 更健壮的底层框架。
* 更强大的性能。
* 更小的序列化文件。
* 更好的交互体验。
* 更多的组件支持。
* 更强大的文本自述能力。
* 更合理的组件调整。
* 更灵活的组件插拔。
* 更高效的二次开发。
* 更丰富的Demo示例。
* 增加`Time`时间轴。
* 增加`SingleAxis`单轴。
* 增加`Comment`文本组件。
* 增加`Widgets`小组件。
* 增加多种坐标系:`Grid``Polar``Radar``SingleAxis`
* 增加多种动画方式。
* 增加多种图表交互。
* 增加国际化支持。
* 增加多种扩展图表。

## v3.0.0-preivew9

Expand Down
37 changes: 21 additions & 16 deletions Documentation/CHANGELOG-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# 更新日志

[master](#master)
[v3.0.0](#v3.0.0)
[v2.3.0](#v2.3.0)
[v2.2.3](#v2.2.3)
[v2.2.2](#v2.2.2)
Expand Down Expand Up @@ -37,22 +38,26 @@
[v0.5.0](#v0.5.0)
[v0.1.0](#v0.1.0)

## master

* (2022.04.23) Remove `Serie` `IconStyle` component
* (2022.04.23) Enhance `LabelStyle`, all components `TextStyle` will be upgraded to `LabelStyle`
* (2022.04.19) Added `Label` `rotate` to support setting rotation
* (2022.04.17) Fixed animation invalidation of `Bar` when the value is negative
* (2022.04.17) Added `BorderGap` support for `ItemStyle` to set border spacing
* (2022.04.16) Optimize the `Border` and `Capsule` histogram of `Bar`
* (2021.08.15) Fixed the problem of displaying exceptions after adding data again when `DataZoom` is enable (#163)
* (2021.08.15) Improved `Axis`'s `AxisLabel` text rotate setting to avoid inconsistency offset in `DataZoom` (#163)
* (2021.08.14) Added `Legend`'s `textAutoColor` to set the text color match with `Serie` color (#163)
* (2021.08.12) Optimize `BarChart` setting `Corner` when the positive and negative columns are fillet symmetric
* (2021.08.03) Fixed y axis not displaying when all data is 0
* (2021.07.29) Fixed ignored data will also participate in calculations when `ignore` is enabled (#161)
* (2021.07.29) Improved `BarChart`'s `Zebra` gradient support
* (2021.07.26) Fixed issue where `XCharts` path could not be found when `TextMeshPro Enable` (#160)
## v3.0.0

* More robust underlying framework.
* More powerful performance.
* Smaller serialized files.
* Better interactive experience.
* More component support.
* More powerful ability to self-report text.
* More reasonable component adjustments.
* More flexible component insertion and removal.
* More efficient secondary development.
* Richer Demo examples.
* Added `Time` axis.
* Added `SingleAxis`.
* Added multiple coordinate systems: `Grid`, `Polar`, `Radar`, `SingleAxis`.
* Added multiple animation methods.
* Added multiple chart interactions.
* Added internationalization support.
* Added `Widgets`.
* Added multiple extension charts.

## v2.3.0

Expand Down
141 changes: 141 additions & 0 deletions Documentation/README-EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<p align="center">
<a href="">
<img src="" alt="" width="" height="">
</a>
</p>
<h2 align="center">XCharts</h3>
<p align="center">
A powerful, easy-to-use, configurable charting and data visualization library for Unity.
<br>
Unity数据可视化图表插件。
<br>
<a href="https://github.com/XCharts-Team/XCharts">中文</a>
</p>
<p align="center">
<a href="https://github.com/XCharts-Team/XCharts/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/XCharts-Team/XCharts">
</a>
<a href="https://github.com/XCharts-Team/XCharts/releases">
<img src="https://img.shields.io/github/v/release/XCharts-Team/XCharts?include_prereleases">
</a>
<a href="">
<img src="https://img.shields.io/github/repo-size/monitor1394/unity-ugui-xcharts">
</a>
<a href="">
<img src="https://img.shields.io/github/languages/code-size/monitor1394/unity-ugui-xcharts">
</a>
<a href="">
<img src="https://img.shields.io/badge/Unity-5.6+-green">
</a>
<a href="">
<img src="https://img.shields.io/badge/TextMeshPro-YES-green">
</a>
</p>
<p align="center">
<a href="">
<img src="https://img.shields.io/github/stars/XCharts-Team/XCharts?style=social">
</a>
<a href="">
<img src="https://img.shields.io/github/forks/XCharts-Team/XCharts?style=social">
</a>
<a href="">
<img src="https://img.shields.io/github/issues-closed/XCharts-Team/XCharts?color=green&label=%20%20%20%20issues&logoColor=green&style=social">
</a>
</p>

A powerful, easy-to-use, configurable charting and data visualization library for Unity. Supporting line, bar, pie, radar, scatter, heatmap, ring, candlestick, polar, liquid and other common chart. Also support 3d pie, 3d bar, 3d pyramid, funnel, gauge, liquid, pictorialbar, gantt, treemap and ther extended chart.

[XCharts3.0 Tutorial](XChartsTutorial01-EN.md)
[XCharts3.0 API](XChartsAPI-EN.md)
[XCharts3.0 FAQ](XChartsFAQ-EN.md)
[XCharts3.0 Configurate](XChartsConfiguration-EN.md)
[XCharts3.0 Changelog](../CHANGELOG.md)
[XCharts3.0 Support](SUPPORT.md)

## Features

* Rich built-in examples and templates, parameter visualization configuration, effect real-time preview, pure code drawing.
* Support line, bar, pie, radar, scatter, heatmaps, gauge, ring, polar, liquid and other common chart.
* Support line graph, curve graph, area graph, step graph and other LineChart.
* Support parallel bar, stack bar, stack percentage bar, zebra bar and other BarChart.
* Support ring, rose and other PieChart.
* Support line-bar chart, scatter-line chart and other combination chart.
* Support solid line, curve, ladder line, dotted line, dash line, dot line, double dot line and other lines.
* Support custom theme, built-in theme switching.
* Support custom chart content drawing, drawing points, line, curve, triangle, quadrilateral, circle, ring, sector, border, arrow and other drawing API.
* Support interactive operations such as data filtering, view zooming and detail display on PC and mobile terminals.
* Support 10,000-level big data rendering.
* Support TextMeshPro.

## XCharts3.0 new feature

* Added `Time` axis.
* Added `SingleAxis`.
* Added multiple coordinate systems: `Grid`, `Polar`, `Radar`, `SingleAxis`.
* Added multiple animation methods.
* Added multiple chart interactions.
* Added internationalization support.
* Added `Widgets`.
* Added multiple extension charts.

## XCharts3.0 improvements over XCharts2.0

* More robust underlying framework.
* More powerful performance.
* Smaller serialized files.
* Better interactive experience.
* More component support.
* More powerful ability to self-report text.
* More reasonable component adjustments.
* More flexible component insertion and removal.
* More efficient secondary development.
* Richer Demo examples.

## XCharts3.0 and 2.0 data comparison

| Case | XCharts2.0 | XCharts3.0 | Note |
| -- | -- | -- | -- |
| Fps of 2000 data line chart | ` 20 ` | ` 83 ` | Performance improvements `3` times |
| Vertices of 2000 data line chart | ` 36.5 k ` | ` 6.7 k ` | Vertices reduce `4` times |
| Prefab size of 2000 data line chart | ` 11.1 MB ` | ` 802 KB ` | Serialized file size to reduce `10` times |
| Max data of a single line chart | ` 4.1 k ` | ` 19 k ` | Single Serie data capacity improvement `4` times |
| Num of chart support | ` 11 ` | ` 23 ` | More than `1` times as many chart are supported |

## Screenshots

![buildinchart](https://github.com/XCharts-Team/XCharts-Demo/blob/master/buildinchart.png)

![extendchart](https://github.com/XCharts-Team/XCharts-Demo/blob/master/extendchart.png)

For more examples, see [XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo), You can also go to [Online Demo](https://xcharts-team.github.io/demo/) to see the running effect of `WebGL`.

## Use

1. Import `XCharts` unitypackage or source code into the project.
2. Right-click `Hierarchy` view and choose `XCharts->LineChart` to create a default LineChart.
3. You can adjust the parameters of each component in `Inspector` and see the real-time effects in `Game` view.

See more tutorial: [XCharts tutorial: 5 minutes overhand tutorial](XChartsTutorial01-EN.md)

## FAQ

1. Is `XCharts` free to use?
A: `XCharts` uses the `MIT` licence and is free to use. You can also subscribe to `VIP` to enjoy more value-added services.

2. Does `XCharts` support code to dynamically add and modify data? Does it support getting data from `Excel` or a database?
A: Support code to dynamically add and modify data, but data needs to be parsed or retrieved by itself, and then added to `XCharts` by calling the public interface of `XCharts`.

3. Does this plugin work on other platforms (e.g. Winform or WPF) besides Unity?
A: It is currently only supported on Unity. Theoretically any version of Unity that supports `UGUI` can run `XCharts`.

## Changelog

[Changelog](CHANGELOG.md)

## Licenses

[MIT License](LICENSE.md)

## Other

email: `[email protected]`
1 change: 0 additions & 1 deletion Documentation/XChartsAPI-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,6 @@ Inherits or Implemented: [BaseChart](#BaseChart)

|public method|description|
|--|--|
| `CopyFolder()` |public static bool CopyFolder(string sourPath, string destPath)</br> |
| `GetAllAssemblyTypes()` |public static IEnumerable<Type> GetAllAssemblyTypes()</br> |
| `GetAllTypesDerivedFrom()` |public static IEnumerable<Type> GetAllTypesDerivedFrom(Type type)</br> |
| `GetAllTypesDerivedFrom<T>()` |public static IEnumerable<Type> GetAllTypesDerivedFrom<T>()</br> |
Expand Down
1 change: 0 additions & 1 deletion Documentation/XChartsAPI-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,6 @@ Inherits or Implemented: [BaseChart](#BaseChart)

|public method|description|
|--|--|
| `CopyFolder()` |public static bool CopyFolder(string sourPath, string destPath)</br> |
| `GetAllAssemblyTypes()` |public static IEnumerable<Type> GetAllAssemblyTypes()</br> |
| `GetAllTypesDerivedFrom()` |public static IEnumerable<Type> GetAllTypesDerivedFrom(Type type)</br> |
| `GetAllTypesDerivedFrom<T>()` |public static IEnumerable<Type> GetAllTypesDerivedFrom<T>()</br> |
Expand Down
10 changes: 5 additions & 5 deletions Documentation/XChartsConfiguration-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|field|default|comment|
|--|--|--|
| `show` |true | Whether the label line is showed. |
| `lineType` | | the type of visual guide line.</br>`LineType`:</br>- `Normal`: the normal line chart, 普通折线图。</br>- `Smooth`: the smooth line chart, 平滑曲线。</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `lineType` | | the type of visual guide line.</br>`LineType`:</br>- `Normal`: the normal line chart,</br>- `Smooth`: the smooth line chart,</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `lineColor` |ChartConst.clearColor32 | the color of visual guild line. |
| `lineAngle` |0 | the angle of visual guild line. |
| `lineWidth` |1.0f | the width of visual guild line. |
Expand Down Expand Up @@ -1048,8 +1048,8 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `sampleDist` |0 | the min pixel dist of sample. |
| `sampleType` | | the type of sample.</br>`SampleType`:</br>- `Peak`: Take a peak. When the average value of the filter point is greater than or equal to 'sampleAverage', take the maximum value; If you do it the other way around, you get the minimum.</br>- `Average`: Take the average of the filter points.</br>- `Max`: Take the maximum value of the filter point.</br>- `Min`: Take the minimum value of the filter point.</br>- `Sum`: Take the sum of the filter points.</br>|
| `sampleAverage` |0 | 设定的采样平均值。当sampleType 为 Peak 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。 |
| `lineType` | | The type of line chart.</br>`LineType`:</br>- `Normal`: the normal line chart, 普通折线图。</br>- `Smooth`: the smooth line chart, 平滑曲线。</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: 普通柱形图</br>- `Zebra`: 斑马柱形图</br>- `Capsule`: 胶囊柱形图</br>|
| `lineType` | | The type of line chart.</br>`LineType`:</br>- `Normal`: the normal line chart,</br>- `Smooth`: the smooth line chart,</br>- `StepStart`: step line.</br>- `StepMiddle`: step line.</br>- `StepEnd`: step line.</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: normal bar.</br>- `Zebra`: zebra bar.</br>- `Capsule`: capsule bar.</br>|
| `barPercentStack` |false | 柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true,则就显示成百分比堆叠柱状图。 |
| `barWidth` |0 | The width of the bar. Adaptive when default 0. |
| `barGap` |0.1f | The gap between bars between different series, is a percent value like '0.3f' , which means 30% of the bar width, can be set as a fixed value. |
Expand All @@ -1066,7 +1066,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `roundCap` | | 是否开启圆弧效果。 |
| `splitNumber` | | 刻度分割段数。最大可设置36。 |
| `clickOffset` |true | Whether offset when mouse click pie chart item. |
| `roseType` | | Whether to show as Nightingale chart.</br>`RoseType`:</br>- `None`: Don't show as Nightingale chart.不展示成南丁格尔玫瑰图</br>- `Radius`: Use central angle to show the percentage of data, radius to show data size.</br>- `Area`: All the sectors will share the same central angle, the data size is shown only through radiuses.</br>|
| `roseType` | | Whether to show as Nightingale chart.</br>`RoseType`:</br>- `None`: Don't show as Nightingale chart.</br>- `Radius`: Use central angle to show the percentage of data, radius to show data size.</br>- `Area`: All the sectors will share the same central angle, the data size is shown only through radiuses.</br>|
| `gap` | | gap of item. |
| `center` | | the center of chart. |
| `radius` | | the radius of chart. |
Expand All @@ -1081,7 +1081,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `large` |true | 是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。 开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。 缺点:优化后不能自定义设置单个数据项的样式,不能显示Label。 |
| `largeThreshold` |200 | 开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 |
| `avoidLabelOverlap` |false | 在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 |
| `radarType` | | 雷达图类型。</br>`RadarType`:</br>- `Multiple`: 多圈雷达图。此时可一个雷达里绘制多个圈,一个serieData就可组成一个圈(多维数据)。</br>- `Single`: 单圈雷达图。此时一个雷达只能绘制一个圈,多个serieData组成一个圈,数据取自`data[1]`</br>|
| `radarType` | | 雷达图类型。</br>`RadarType`:</br>- `Multiple`: multiple radar.</br>- `Single`: single radar.</br>|
| `placeHolder` |false | 占位模式。占位模式时,数据有效但不参与渲染和显示。 |
| `dataSortType` | | 组件的数据排序。</br>`SerieDataSortType`:</br>- `None`: 按 data 的顺序</br>- `Ascending`: 升序</br>- `Descending`: 降序</br>|
| `orient` | | 组件的朝向。</br>`Orient`:</br>- `Horizonal`: 水平</br>- `Vertical`: 垂直</br>|
Expand Down
8 changes: 4 additions & 4 deletions Documentation/XChartsConfiguration-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ Inherits or Implemented: [ChildComponent](#ChildComponent),[ISerieExtraComponent
|field|default|comment|
|--|--|--|
| `show` |true | 是否显示视觉引导线。 |
| `lineType` | | 视觉引导线类型。</br>`LineType`:</br>- `Normal`: the normal line chart, 普通折线图。</br>- `Smooth`: the smooth line chart, 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `lineType` | | 视觉引导线类型。</br>`LineType`:</br>- `Normal`: 普通折线图。</br>- `Smooth`: 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `lineColor` |ChartConst.clearColor32 | 视觉引导线颜色。默认和serie一致取自调色板。 |
| `lineAngle` |0 | 视觉引导线的固定角度。对折线和曲线有效。 |
| `lineWidth` |1.0f | 视觉引导线的宽度。 |
Expand Down Expand Up @@ -1048,8 +1048,8 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `sampleDist` |0 | 采样的最小像素距离,默认为0时不采样。当两个数据点间的水平距离小于改值时,开启采样,保证两点间的水平距离不小于改值。 |
| `sampleType` | | 采样类型。当sampleDist大于0时有效。</br>`SampleType`:</br>- `Peak`: 取峰值。</br>- `Average`: 取过滤点的平均值。</br>- `Max`: 取过滤点的最大值。</br>- `Min`: 取过滤点的最小值。</br>- `Sum`: 取过滤点的和。</br>|
| `sampleAverage` |0 | 设定的采样平均值。当sampleType 为 Peak 时,用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。 |
| `lineType` | | 折线图样式类型。</br>`LineType`:</br>- `Normal`: the normal line chart, 普通折线图。</br>- `Smooth`: the smooth line chart, 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: 普通柱形图</br>- `Zebra`: 斑马柱形图</br>- `Capsule`: 胶囊柱形图</br>|
| `lineType` | | 折线图样式类型。</br>`LineType`:</br>- `Normal`: 普通折线图。</br>- `Smooth`: 平滑曲线。</br>- `StepStart`: 阶梯线图:当前点。</br>- `StepMiddle`: 阶梯线图:当前点和下一个点的中间。</br>- `StepEnd`: 阶梯线图:下一个拐点。</br>|
| `barType` | | 柱形图类型。</br>`BarType`:</br>- `Normal`: 普通柱形图</br>- `Zebra`: 斑马柱形图</br>- `Capsule`: 胶囊柱形图</br>|
| `barPercentStack` |false | 柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true,则就显示成百分比堆叠柱状图。 |
| `barWidth` |0 | 柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 |
| `barGap` |0.1f | <para>Set barGap as '-1' can overlap bars that belong to different series, which is useful when making a series of bar be background. |
Expand All @@ -1066,7 +1066,7 @@ Inherits or Implemented: [BaseSerie](#BaseSerie),[IComparable](#IComparable)
| `roundCap` | | 是否开启圆弧效果。 |
| `splitNumber` | | 刻度分割段数。最大可设置36。 |
| `clickOffset` |true | 鼠标点击时是否开启偏移,一般用在PieChart图表中。 |
| `roseType` | | 是否展示成南丁格尔图,通过半径区分数据大小。</br>`RoseType`:</br>- `None`: Don't show as Nightingale chart.不展示成南丁格尔玫瑰图</br>- `Radius`: 扇区圆心角展现数据的百分比,半径展现数据的大小。</br>- `Area`: 所有扇区圆心角相同,仅通过半径展现数据大小。</br>|
| `roseType` | | 是否展示成南丁格尔图,通过半径区分数据大小。</br>`RoseType`:</br>- `None`: 不展示成南丁格尔玫瑰图</br>- `Radius`: 扇区圆心角展现数据的百分比,半径展现数据的大小。</br>- `Area`: 所有扇区圆心角相同,仅通过半径展现数据大小。</br>|
| `gap` | | 间距。 |
| `center` | | 中心点。 |
| `radius` | | 半径。radius[0]表示内径,radius[1]表示外径。 |
Expand Down
Loading

0 comments on commit 6e87f82

Please sign in to comment.