mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
Optimize some details
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
* (2021.01.25) Optimize some details
|
||||||
* (2021.01.22) Fixed a `Inpsector` displayed error
|
* (2021.01.22) Fixed a `Inpsector` displayed error
|
||||||
* (2021.01.21) Release `v2.0.0-preview.2` version
|
* (2021.01.21) Release `v2.0.0-preview.2` version
|
||||||
* (2021.01.21) Fixed an error about `AxisTick` in `Inpsector`
|
* (2021.01.21) Fixed an error about `AxisTick` in `Inpsector`
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
|
* (2021.01.25) 优化一些细节
|
||||||
* (2021.01.22) 修复`Inpsector`上部分属性显示异常的问题
|
* (2021.01.22) 修复`Inpsector`上部分属性显示异常的问题
|
||||||
* (2021.01.21) 发布`v2.0.0-preview.2`版本
|
* (2021.01.21) 发布`v2.0.0-preview.2`版本
|
||||||
* (2021.01.21) 修复`Inpsector`上展开`AxisTick`时报错问题
|
* (2021.01.21) 修复`Inpsector`上展开`AxisTick`时报错问题
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace XCharts
|
|||||||
{
|
{
|
||||||
BlockStart();
|
BlockStart();
|
||||||
EditorGUILayout.BeginHorizontal();
|
EditorGUILayout.BeginHorizontal();
|
||||||
var version = string.Format("V{0}_{1}", XChartsMgr.version, XChartsMgr.versionDate);
|
var version = string.Format("v{0}_{1}", XChartsMgr.version, XChartsMgr.versionDate);
|
||||||
if (m_EnableTextMeshPro.boolValue)
|
if (m_EnableTextMeshPro.boolValue)
|
||||||
{
|
{
|
||||||
version += " TMP";
|
version += " TMP";
|
||||||
@@ -243,10 +243,10 @@ namespace XCharts
|
|||||||
{
|
{
|
||||||
m_Chart.RemoveChartObject();
|
m_Chart.RemoveChartObject();
|
||||||
}
|
}
|
||||||
if (GUILayout.Button("Check XCharts Update"))
|
// if (GUILayout.Button("Check XCharts Update"))
|
||||||
{
|
// {
|
||||||
CheckVersionEditor.ShowWindow();
|
// CheckVersionEditor.ShowWindow();
|
||||||
}
|
// }
|
||||||
if (m_CheckWarning)
|
if (m_CheckWarning)
|
||||||
{
|
{
|
||||||
EditorGUILayout.BeginHorizontal();
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace XCharts
|
|||||||
GUILayout.Label("The current version: " + mgr.nowVersion);
|
GUILayout.Label("The current version: " + mgr.nowVersion);
|
||||||
if (mgr.needUpdate && !mgr.isCheck)
|
if (mgr.needUpdate && !mgr.isCheck)
|
||||||
{
|
{
|
||||||
GUILayout.Label("The latest version: " + mgr.newVersion);
|
GUILayout.Label("The remote version: " + mgr.newVersion);
|
||||||
GUILayout.Label("");
|
GUILayout.Label("");
|
||||||
if (mgr.isCheck) GUILayout.Label("check ...");
|
if (mgr.isCheck) GUILayout.Label("check ...");
|
||||||
else if (mgr.isNetworkError) GUILayout.Label("check failed: " + mgr.networkError);
|
else if (mgr.isNetworkError) GUILayout.Label("check failed: " + mgr.networkError);
|
||||||
@@ -72,9 +72,9 @@ namespace XCharts
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mgr.isCheck) GUILayout.Label("The latest version: checking ...");
|
if (mgr.isCheck) GUILayout.Label("The remote version: checking ...");
|
||||||
else if (mgr.isNetworkError) GUILayout.Label("check failed: " + mgr.networkError);
|
else if (mgr.isNetworkError) GUILayout.Label("check failed: " + mgr.networkError);
|
||||||
else GUILayout.Label("The latest version: " + mgr.newVersion);
|
else GUILayout.Label("The remote version: " + mgr.newVersion);
|
||||||
|
|
||||||
GUILayout.Label("");
|
GUILayout.Label("");
|
||||||
if (!mgr.isNetworkError && !mgr.needUpdate && !mgr.isCheck)
|
if (!mgr.isNetworkError && !mgr.needUpdate && !mgr.isCheck)
|
||||||
|
|||||||
39
README.md
39
README.md
@@ -10,16 +10,35 @@
|
|||||||
一款基于UGUI的数据可视化图表插件。
|
一款基于UGUI的数据可视化图表插件。
|
||||||
<br>
|
<br>
|
||||||
</p>
|
</p>
|
||||||
|
<p align="center">
|
||||||

|
<a href="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/LICENSE">
|
||||||
[](https://www.npmjs.org/package/unity-ugui-xcharts)
|
<img src="https://img.shields.io/github/license/monitor1394/unity-ugui-XCharts">
|
||||||
[](https://github.com/monitor1394/unity-ugui-XCharts/releases)
|
</a>
|
||||||

|
<a href="">
|
||||||
[](https://github.com/monitor1394/unity-ugui-XCharts/releases)
|
<img src="https://img.shields.io/github/languages/code-size/monitor1394/unity-ugui-xcharts">
|
||||||
[](https://www.npmjs.org/package/unity-ugui-xcharts)
|
</a>
|
||||||
[](https://www.npmjs.org/package/unity-ugui-xcharts)
|
<a href="https://www.npmjs.org/package/unity-ugui-xcharts">
|
||||||

|
<img src="https://img.shields.io/npm/v/unity-ugui-xcharts.svg?label=npm">
|
||||||

|
</a>
|
||||||
|
<a href="https://www.npmjs.org/package/unity-ugui-xcharts">
|
||||||
|
<img src="https://img.shields.io/npm/dt/unity-ugui-xcharts?label=npm%20downloads%20">
|
||||||
|
</a>
|
||||||
|
<a href="https://www.npmjs.org/package/unity-ugui-xcharts">
|
||||||
|
<img src="https://img.shields.io/npm/dm/unity-ugui-xcharts?label=%20">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/monitor1394/unity-ugui-XCharts/releases">
|
||||||
|
<img src="https://img.shields.io/github/v/release/monitor1394/unity-ugui-XCharts?include_prereleases&label=github">
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/monitor1394/unity-ugui-XCharts/releases">
|
||||||
|
<img src="https://img.shields.io/github/downloads/monitor1394/unity-ugui-XCharts/total?label=github%20downloads">
|
||||||
|
</a>
|
||||||
|
<a href="">
|
||||||
|
<img src="https://img.shields.io/badge/Unity-5.6%20%7C%202017%20%7C%202018%20%7C%202019%20%7C%202020%20%7C%202021-green">
|
||||||
|
</a>
|
||||||
|
<a href="">
|
||||||
|
<img src="https://img.shields.io/badge/TextMeshPro-YES-green">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
A powerful, easy-to-use, configurable charting and data visualization library for Unity. Supporting line, bar, pie, radar, scatter, heatmap, gauge, ring, polar, liquid and other common chart.
|
A powerful, easy-to-use, configurable charting and data visualization library for Unity. Supporting line, bar, pie, radar, scatter, heatmap, gauge, ring, polar, liquid and other common chart.
|
||||||
|
|
||||||
|
|||||||
@@ -1021,7 +1021,8 @@ namespace XCharts
|
|||||||
pX += startX - yAxis.axisTick.GetLength(m_Theme.axis.tickLength);
|
pX += startX - yAxis.axisTick.GetLength(m_Theme.axis.tickLength);
|
||||||
}
|
}
|
||||||
UGL.DrawLine(vh, new Vector3(startX, pY), new Vector3(pX, pY),
|
UGL.DrawLine(vh, new Vector3(startX, pY), new Vector3(pX, pY),
|
||||||
yAxis.axisTick.GetWidth(m_Theme.axis.tickWidth), m_Theme.axis.tickColor);
|
yAxis.axisTick.GetWidth(m_Theme.axis.tickWidth),
|
||||||
|
yAxis.axisTick.GetColor(m_Theme.axis.tickColor));
|
||||||
}
|
}
|
||||||
totalWidth += scaleWidth;
|
totalWidth += scaleWidth;
|
||||||
}
|
}
|
||||||
@@ -1038,7 +1039,8 @@ namespace XCharts
|
|||||||
var startPos = new Vector3(lineX, grid.runtimeY + grid.runtimeHeight);
|
var startPos = new Vector3(lineX, grid.runtimeY + grid.runtimeHeight);
|
||||||
var arrowPos = new Vector3(lineX, grid.runtimeY);
|
var arrowPos = new Vector3(lineX, grid.runtimeY);
|
||||||
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
||||||
axisArrow.offset, axisArrow.dent, axisArrow.GetColor(m_Theme.axis.lineColor));
|
axisArrow.offset, axisArrow.dent,
|
||||||
|
axisArrow.GetColor(yAxis.axisLine.GetColor(m_Theme.axis.lineColor)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1046,7 +1048,8 @@ namespace XCharts
|
|||||||
var startPos = new Vector3(lineX, grid.runtimeX);
|
var startPos = new Vector3(lineX, grid.runtimeX);
|
||||||
var arrowPos = new Vector3(lineX, grid.runtimeY + grid.runtimeHeight + lineWidth);
|
var arrowPos = new Vector3(lineX, grid.runtimeY + grid.runtimeHeight + lineWidth);
|
||||||
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
||||||
axisArrow.offset, axisArrow.dent, axisArrow.GetColor(m_Theme.axis.lineColor));
|
axisArrow.offset, axisArrow.dent,
|
||||||
|
axisArrow.GetColor(yAxis.axisLine.GetColor(m_Theme.axis.lineColor)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1127,7 +1130,8 @@ namespace XCharts
|
|||||||
pY += startY - xAxis.axisTick.GetLength(m_Theme.axis.tickLength);
|
pY += startY - xAxis.axisTick.GetLength(m_Theme.axis.tickLength);
|
||||||
}
|
}
|
||||||
UGL.DrawLine(vh, new Vector3(pX, startY), new Vector3(pX, pY),
|
UGL.DrawLine(vh, new Vector3(pX, startY), new Vector3(pX, pY),
|
||||||
xAxis.axisTick.GetWidth(m_Theme.axis.tickWidth), m_Theme.axis.tickColor);
|
xAxis.axisTick.GetWidth(m_Theme.axis.tickWidth),
|
||||||
|
xAxis.axisTick.GetColor(m_Theme.axis.tickColor));
|
||||||
}
|
}
|
||||||
totalWidth += scaleWidth;
|
totalWidth += scaleWidth;
|
||||||
}
|
}
|
||||||
@@ -1144,14 +1148,16 @@ namespace XCharts
|
|||||||
var startPos = new Vector3(grid.runtimeX + grid.runtimeWidth, lineY);
|
var startPos = new Vector3(grid.runtimeX + grid.runtimeWidth, lineY);
|
||||||
var arrowPos = new Vector3(grid.runtimeX, lineY);
|
var arrowPos = new Vector3(grid.runtimeX, lineY);
|
||||||
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
||||||
axisArrow.offset, axisArrow.dent, axisArrow.GetColor(m_Theme.axis.lineColor));
|
axisArrow.offset, axisArrow.dent,
|
||||||
|
axisArrow.GetColor(xAxis.axisLine.GetColor(m_Theme.axis.lineColor)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var startPos = new Vector3(grid.runtimeX, lineY);
|
var startPos = new Vector3(grid.runtimeX, lineY);
|
||||||
var arrowPos = new Vector3(grid.runtimeX + grid.runtimeWidth + xAxis.axisLine.GetWidth(m_Theme.axis.lineWidth), lineY);
|
var arrowPos = new Vector3(grid.runtimeX + grid.runtimeWidth + xAxis.axisLine.GetWidth(m_Theme.axis.lineWidth), lineY);
|
||||||
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
UGL.DrawArrow(vh, startPos, arrowPos, axisArrow.width, axisArrow.height,
|
||||||
axisArrow.offset, axisArrow.dent, axisArrow.GetColor(m_Theme.axis.lineColor));
|
axisArrow.offset, axisArrow.dent,
|
||||||
|
axisArrow.GetColor(xAxis.axisLine.GetColor(m_Theme.axis.lineColor)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace XCharts
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return !isNetworkError && !m_NowVersion.Equals(m_NewVersion);
|
return !isNetworkError && newDate > versionDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user