Optimize some details

This commit is contained in:
monitor1394
2021-01-25 09:12:22 +08:00
parent 3a47c5de2a
commit feeae66e32
7 changed files with 52 additions and 25 deletions

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2021.01.25) Optimize some details
* (2021.01.22) Fixed a `Inpsector` displayed error
* (2021.01.21) Release `v2.0.0-preview.2` version
* (2021.01.21) Fixed an error about `AxisTick` in `Inpsector`

View File

@@ -1,6 +1,7 @@
# 更新日志
* (2021.01.25) 优化一些细节
* (2021.01.22) 修复`Inpsector`上部分属性显示异常的问题
* (2021.01.21) 发布`v2.0.0-preview.2`版本
* (2021.01.21) 修复`Inpsector`上展开`AxisTick`时报错问题

View File

@@ -101,7 +101,7 @@ namespace XCharts
{
BlockStart();
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)
{
version += " TMP";
@@ -243,10 +243,10 @@ namespace XCharts
{
m_Chart.RemoveChartObject();
}
if (GUILayout.Button("Check XCharts Update"))
{
CheckVersionEditor.ShowWindow();
}
// if (GUILayout.Button("Check XCharts Update"))
// {
// CheckVersionEditor.ShowWindow();
// }
if (m_CheckWarning)
{
EditorGUILayout.BeginHorizontal();

View File

@@ -37,7 +37,7 @@ namespace XCharts
GUILayout.Label("The current version: " + mgr.nowVersion);
if (mgr.needUpdate && !mgr.isCheck)
{
GUILayout.Label("The latest version: " + mgr.newVersion);
GUILayout.Label("The remote version: " + mgr.newVersion);
GUILayout.Label("");
if (mgr.isCheck) GUILayout.Label("check ...");
else if (mgr.isNetworkError) GUILayout.Label("check failed: " + mgr.networkError);
@@ -72,9 +72,9 @@ namespace XCharts
}
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 GUILayout.Label("The latest version: " + mgr.newVersion);
else GUILayout.Label("The remote version: " + mgr.newVersion);
GUILayout.Label("");
if (!mgr.isNetworkError && !mgr.needUpdate && !mgr.isCheck)

View File

@@ -10,16 +10,35 @@
一款基于UGUI的数据可视化图表插件。
<br>
</p>
![license](https://img.shields.io/github/license/monitor1394/unity-ugui-XCharts)
[![npm Package](https://img.shields.io/npm/v/unity-ugui-xcharts.svg)](https://www.npmjs.org/package/unity-ugui-xcharts)
[![github release](https://img.shields.io/github/v/release/monitor1394/unity-ugui-XCharts?include_prereleases&label=github)](https://github.com/monitor1394/unity-ugui-XCharts/releases)
![code size](https://img.shields.io/github/languages/code-size/monitor1394/unity-ugui-xcharts)
[![github download](https://img.shields.io/github/downloads/monitor1394/unity-ugui-XCharts/total?label=github%20downloads)](https://github.com/monitor1394/unity-ugui-XCharts/releases)
[![npm downloads](https://img.shields.io/npm/dt/unity-ugui-xcharts?label=npm%20downloads%20)](https://www.npmjs.org/package/unity-ugui-xcharts)
[![npm downloads](https://img.shields.io/npm/dm/unity-ugui-xcharts?label=%20)](https://www.npmjs.org/package/unity-ugui-xcharts)
![unity version](https://img.shields.io/badge/Unity-5.6%20%7C%202017%20%7C%202018%20%7C%202019%20%7C%202020%20%7C%202021-green)
![textmeshpro](https://img.shields.io/badge/TextMeshPro-YES-green)
<p align="center">
<a href="https://github.com/monitor1394/unity-ugui-XCharts/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/monitor1394/unity-ugui-XCharts">
</a>
<a href="">
<img src="https://img.shields.io/github/languages/code-size/monitor1394/unity-ugui-xcharts">
</a>
<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.

View File

@@ -1021,7 +1021,8 @@ namespace XCharts
pX += startX - yAxis.axisTick.GetLength(m_Theme.axis.tickLength);
}
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;
}
@@ -1038,7 +1039,8 @@ namespace XCharts
var startPos = new Vector3(lineX, grid.runtimeY + grid.runtimeHeight);
var arrowPos = new Vector3(lineX, grid.runtimeY);
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
{
@@ -1046,7 +1048,8 @@ namespace XCharts
var startPos = new Vector3(lineX, grid.runtimeX);
var arrowPos = new Vector3(lineX, grid.runtimeY + grid.runtimeHeight + lineWidth);
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);
}
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;
}
@@ -1144,14 +1148,16 @@ namespace XCharts
var startPos = new Vector3(grid.runtimeX + grid.runtimeWidth, lineY);
var arrowPos = new Vector3(grid.runtimeX, lineY);
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
{
var startPos = new Vector3(grid.runtimeX, 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,
axisArrow.offset, axisArrow.dent, axisArrow.GetColor(m_Theme.axis.lineColor));
axisArrow.offset, axisArrow.dent,
axisArrow.GetColor(xAxis.axisLine.GetColor(m_Theme.axis.lineColor)));
}
}
}

View File

@@ -104,7 +104,7 @@ namespace XCharts
{
get
{
return !isNetworkError && !m_NowVersion.Equals(m_NewVersion);
return !isNetworkError && newDate > versionDate;
}
}