mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 12:08:46 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d2f83169d | ||
|
|
a7c4e24555 | ||
|
|
6fad4fcccc | ||
|
|
95e40c6f1a | ||
|
|
8e30a370b5 | ||
|
|
d94e304058 | ||
|
|
34dc49004e | ||
|
|
61c6d68c4c |
@@ -2,6 +2,7 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
[branch-2.0](#branch-2.0)
|
[branch-2.0](#branch-2.0)
|
||||||
|
[v2.8.2](#v2.8.2)
|
||||||
[v2.8.1](#v2.8.1)
|
[v2.8.1](#v2.8.1)
|
||||||
[v2.8.0](#v2.8.0)
|
[v2.8.0](#v2.8.0)
|
||||||
[v2.7.0](#v2.7.0)
|
[v2.7.0](#v2.7.0)
|
||||||
@@ -45,6 +46,13 @@
|
|||||||
|
|
||||||
## branch-2.0
|
## branch-2.0
|
||||||
|
|
||||||
|
## v2.8.2
|
||||||
|
|
||||||
|
* (2022.08.15) Release `v2.8.2` version
|
||||||
|
* (2022.08.15) Added support for the `HeatmapChart` formatter for custom Tooltip
|
||||||
|
* (2022.07.13) Fixed `SerieLabel` refresh exception #215
|
||||||
|
* (2022.06.30) Optimize `Radar` so that the `Tooltip` layer is above `Indicator`
|
||||||
|
|
||||||
## v2.8.1
|
## v2.8.1
|
||||||
|
|
||||||
* (2022.05.03) Added `onLegendClick`, `onLegendEnter` and `onLegendExit` delegate callbacks for `Legend`
|
* (2022.05.03) Added `onLegendClick`, `onLegendEnter` and `onLegendExit` delegate callbacks for `Legend`
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
# 更新日志
|
# 更新日志
|
||||||
|
|
||||||
[branch-2.0](#branch-2.0)
|
[branch-2.0](#branch-2.0)
|
||||||
|
[v2.8.2](#v2.8.2)
|
||||||
[v2.8.1](#v2.8.1)
|
[v2.8.1](#v2.8.1)
|
||||||
[v2.8.0](#v2.8.0)
|
[v2.8.0](#v2.8.0)
|
||||||
[v2.7.0](#v2.7.0)
|
[v2.7.0](#v2.7.0)
|
||||||
@@ -45,6 +46,16 @@
|
|||||||
|
|
||||||
## branch-2.0
|
## branch-2.0
|
||||||
|
|
||||||
|
* (2022.12.28) 修复`Pie`只有一个数据时设置`border`后显示异常的问题 (#237)
|
||||||
|
* (2022.08.30) 修复`DataZoom`在某些情况下计算范围不准确的问题 (#221)
|
||||||
|
|
||||||
|
## v2.8.2
|
||||||
|
|
||||||
|
* (2022.08.15) 发布`v2.8.2`版本
|
||||||
|
* (2022.08.15) 增加`HeatmapChart`对自定义`Tooltip`的`formatter`的支持
|
||||||
|
* (2022.07.13) 修复`SerieLabel`刷新异常的问题 #215
|
||||||
|
* (2022.06.30) 优化`Radar`让`Tooltip`的层在`Indicator`之上
|
||||||
|
|
||||||
## v2.8.1
|
## v2.8.1
|
||||||
|
|
||||||
* (2022.05.06) 发布`v2.8.1`版本
|
* (2022.05.06) 发布`v2.8.1`版本
|
||||||
|
|||||||
@@ -712,13 +712,13 @@ namespace XCharts
|
|||||||
int start = 0, end = 0;
|
int start = 0, end = 0;
|
||||||
if (dataZoom.runtimeInvert)
|
if (dataZoom.runtimeInvert)
|
||||||
{
|
{
|
||||||
end = Mathf.CeilToInt(data.Count * dataZoom.end / 100);
|
end = Mathf.RoundToInt(data.Count * dataZoom.end / 100);
|
||||||
start = end - range;
|
start = end - range;
|
||||||
if (start < 0) start = 0;
|
if (start < 0) start = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
start = Mathf.FloorToInt(data.Count * dataZoom.start / 100);
|
start = Mathf.RoundToInt(data.Count * dataZoom.start / 100);
|
||||||
end = start + range;
|
end = start + range;
|
||||||
if (end > data.Count) end = data.Count;
|
if (end > data.Count) end = data.Count;
|
||||||
}
|
}
|
||||||
@@ -735,8 +735,8 @@ namespace XCharts
|
|||||||
if (filterMinShow > data.Count) range = data.Count;
|
if (filterMinShow > data.Count) range = data.Count;
|
||||||
else range = filterMinShow;
|
else range = filterMinShow;
|
||||||
}
|
}
|
||||||
if (range > data.Count - start - 1)
|
if (range > data.Count - start)
|
||||||
start = data.Count - range - 1;
|
start = data.Count - range;
|
||||||
filterData = data.GetRange(start, range);
|
filterData = data.GetRange(start, range);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -49,8 +49,20 @@ namespace XCharts
|
|||||||
visualMap.location.align = Location.Align.BottomLeft;
|
visualMap.location.align = Location.Align.BottomLeft;
|
||||||
visualMap.location.bottom = 100;
|
visualMap.location.bottom = 100;
|
||||||
visualMap.location.left = 30;
|
visualMap.location.left = 30;
|
||||||
var colors = new List<string>{"#313695", "#4575b4", "#74add1", "#abd9e9", "#e0f3f8", "#ffffbf",
|
var colors = new List<string>
|
||||||
"#fee090", "#fdae61", "#f46d43", "#d73027", "#a50026"};
|
{
|
||||||
|
"#313695",
|
||||||
|
"#4575b4",
|
||||||
|
"#74add1",
|
||||||
|
"#abd9e9",
|
||||||
|
"#e0f3f8",
|
||||||
|
"#ffffbf",
|
||||||
|
"#fee090",
|
||||||
|
"#fdae61",
|
||||||
|
"#f46d43",
|
||||||
|
"#d73027",
|
||||||
|
"#a50026"
|
||||||
|
};
|
||||||
visualMap.inRange.Clear();
|
visualMap.inRange.Clear();
|
||||||
foreach (var str in colors)
|
foreach (var str in colors)
|
||||||
{
|
{
|
||||||
@@ -80,11 +92,27 @@ namespace XCharts
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected override void UpdateTooltip()
|
protected override void UpdateTooltip()
|
||||||
|
{
|
||||||
|
var dataIndex = GetDataIndex();
|
||||||
|
if (dataIndex < 0) return;
|
||||||
|
var content = TooltipHelper.GetFormatterContent(tooltip, dataIndex, this);
|
||||||
|
TooltipHelper.SetContentAndPosition(tooltip, content, chartRect);
|
||||||
|
tooltip.SetActive(true);
|
||||||
|
for (int i = 0; i < m_XAxes.Count; i++)
|
||||||
|
{
|
||||||
|
UpdateAxisTooltipLabel(i, m_XAxes[i]);
|
||||||
|
}
|
||||||
|
for (int i = 0; i < m_YAxes.Count; i++)
|
||||||
|
{
|
||||||
|
UpdateAxisTooltipLabel(i, m_YAxes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int GetDataIndex()
|
||||||
{
|
{
|
||||||
var xData = tooltip.runtimeXValues[0];
|
var xData = tooltip.runtimeXValues[0];
|
||||||
var yData = tooltip.runtimeYValues[0];
|
var yData = tooltip.runtimeYValues[0];
|
||||||
if (IsCategory() && (xData < 0 || yData < 0)) return;
|
if (IsCategory() && (xData < 0 || yData < 0)) return -1;
|
||||||
sb.Length = 0;
|
|
||||||
for (int i = 0; i < m_Series.Count; i++)
|
for (int i = 0; i < m_Series.Count; i++)
|
||||||
{
|
{
|
||||||
var serie = m_Series.GetSerie(i);
|
var serie = m_Series.GetSerie(i);
|
||||||
@@ -96,30 +124,11 @@ namespace XCharts
|
|||||||
{
|
{
|
||||||
if (IsCategory())
|
if (IsCategory())
|
||||||
{
|
{
|
||||||
string key = serie.name;
|
return (int) xData * yCount + (int) yData;
|
||||||
var serieData = serie.data[(int)xData * yCount + (int)yData];
|
|
||||||
var value = serieData.data[2];
|
|
||||||
var color = visualMap.enable ? visualMap.GetColor(value) :
|
|
||||||
m_Theme.GetColor(serie.index);
|
|
||||||
sb.Append("\n")
|
|
||||||
.Append(key).Append(!string.IsNullOrEmpty(key) ? "\n" : "")
|
|
||||||
.Append("<color=#").Append(ChartCached.ColorToStr(color)).Append(">● </color>")
|
|
||||||
.Append(xAxis.data[(int)xData]).Append(": ")
|
|
||||||
.Append(ChartCached.FloatToStr(value, string.Empty));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TooltipHelper.SetContentAndPosition(tooltip, sb.ToString().Trim(), chartRect);
|
return -1;
|
||||||
tooltip.SetActive(true);
|
|
||||||
|
|
||||||
for (int i = 0; i < m_XAxes.Count; i++)
|
|
||||||
{
|
|
||||||
UpdateAxisTooltipLabel(i, m_XAxes[i]);
|
|
||||||
}
|
|
||||||
for (int i = 0; i < m_YAxes.Count; i++)
|
|
||||||
{
|
|
||||||
UpdateAxisTooltipLabel(i, m_YAxes[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -642,13 +642,13 @@ namespace XCharts
|
|||||||
int start = 0, end = 0;
|
int start = 0, end = 0;
|
||||||
if (dataZoom.runtimeInvert)
|
if (dataZoom.runtimeInvert)
|
||||||
{
|
{
|
||||||
end = Mathf.CeilToInt(data.Count * dataZoom.end / 100);
|
end = Mathf.RoundToInt(data.Count * dataZoom.end / 100);
|
||||||
start = end - range;
|
start = end - range;
|
||||||
if (start < 0) start = 0;
|
if (start < 0) start = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
start = Mathf.FloorToInt(data.Count * dataZoom.start / 100);
|
start = Mathf.RoundToInt(data.Count * dataZoom.start / 100);
|
||||||
end = start + range;
|
end = start + range;
|
||||||
if (end > data.Count) end = data.Count;
|
if (end > data.Count) end = data.Count;
|
||||||
}
|
}
|
||||||
@@ -666,8 +666,8 @@ namespace XCharts
|
|||||||
if (dataZoom.minShowNum > data.Count) range = data.Count;
|
if (dataZoom.minShowNum > data.Count) range = data.Count;
|
||||||
else range = dataZoom.minShowNum;
|
else range = dataZoom.minShowNum;
|
||||||
}
|
}
|
||||||
if (range > data.Count - start - 1)
|
if (range > data.Count - start)
|
||||||
start = data.Count - range - 1;
|
start = data.Count - range;
|
||||||
serie.m_FilterData = data.GetRange(start, range);
|
serie.m_FilterData = data.GetRange(start, range);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ namespace XCharts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void InitPieTooltip(ref StringBuilder sb, Tooltip tooltip, Serie serie, int index,
|
private static void InitPieTooltip(ref StringBuilder sb, Tooltip tooltip, Serie serie, int index,
|
||||||
ChartTheme theme)
|
ChartTheme theme)
|
||||||
{
|
{
|
||||||
@@ -234,6 +233,35 @@ namespace XCharts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void InitHeatmapTooltip(ref StringBuilder sb, Tooltip tooltip, Serie serie, int index,
|
||||||
|
CoordinateChart chart)
|
||||||
|
{
|
||||||
|
if (serie.type != SerieType.Heatmap) return;
|
||||||
|
var xData = tooltip.runtimeXValues[0];
|
||||||
|
var yData = tooltip.runtimeYValues[0];
|
||||||
|
if (chart.IsCategory() && (xData < 0 || yData < 0)) return;
|
||||||
|
sb.Length = 0;
|
||||||
|
var xAxis = chart.GetXAxis(serie.xAxisIndex);
|
||||||
|
var yAxis = chart.GetYAxis(serie.yAxisIndex);
|
||||||
|
var xCount = xAxis.data.Count;
|
||||||
|
var yCount = yAxis.data.Count;
|
||||||
|
var visualMap = chart.visualMap;
|
||||||
|
if (chart.IsCategory())
|
||||||
|
{
|
||||||
|
string key = serie.name;
|
||||||
|
var serieData = serie.data[(int) xData * yCount + (int) yData];
|
||||||
|
var numericFormatter = GetItemNumericFormatter(tooltip, serie, serieData);
|
||||||
|
var value = serieData.data[2];
|
||||||
|
var color = visualMap.enable ? visualMap.GetColor(value) :
|
||||||
|
chart.theme.GetColor(serie.index);
|
||||||
|
sb.Append("\n")
|
||||||
|
.Append(key).Append(!string.IsNullOrEmpty(key) ? "\n" : "")
|
||||||
|
.Append("<color=#").Append(ChartCached.ColorToStr(color)).Append(">● </color>")
|
||||||
|
.Append(xAxis.data[(int) xData]).Append(": ")
|
||||||
|
.Append(ChartCached.FloatToStr(value, numericFormatter));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void InitDefaultContent(ref StringBuilder sb, Tooltip tooltip, Serie serie, int index,
|
private static void InitDefaultContent(ref StringBuilder sb, Tooltip tooltip, Serie serie, int index,
|
||||||
BaseChart chart, DataZoom dataZoom = null, bool isCartesian = false,
|
BaseChart chart, DataZoom dataZoom = null, bool isCartesian = false,
|
||||||
Radar radar = null)
|
Radar radar = null)
|
||||||
@@ -259,6 +287,7 @@ namespace XCharts
|
|||||||
InitRingTooltip(ref sb, tooltip, serie, index, chart.theme);
|
InitRingTooltip(ref sb, tooltip, serie, index, chart.theme);
|
||||||
break;
|
break;
|
||||||
case SerieType.Heatmap:
|
case SerieType.Heatmap:
|
||||||
|
InitHeatmapTooltip(ref sb, tooltip, serie, index, chart as CoordinateChart);
|
||||||
break;
|
break;
|
||||||
case SerieType.Gauge:
|
case SerieType.Gauge:
|
||||||
InitGaugeTooltip(ref sb, tooltip, serie, index, chart.theme);
|
InitGaugeTooltip(ref sb, tooltip, serie, index, chart.theme);
|
||||||
@@ -335,8 +364,8 @@ namespace XCharts
|
|||||||
{
|
{
|
||||||
string content = itemFormatter;
|
string content = itemFormatter;
|
||||||
FormatterHelper.ReplaceContent(ref content, dataIndex, tooltip.numericFormatter, serie, chart, null);
|
FormatterHelper.ReplaceContent(ref content, dataIndex, tooltip.numericFormatter, serie, chart, null);
|
||||||
var dotColorIndex = serie.type == SerieType.Pie || serie.type == SerieType.Radar
|
var dotColorIndex = serie.type == SerieType.Pie || serie.type == SerieType.Radar ||
|
||||||
|| serie.type == SerieType.Ring ? dataIndex : serie.index;
|
serie.type == SerieType.Ring ? dataIndex : serie.index;
|
||||||
sb.Append(ChartCached.ColorToDotStr(chart.theme.GetColor(dotColorIndex)));
|
sb.Append(ChartCached.ColorToDotStr(chart.theme.GetColor(dotColorIndex)));
|
||||||
sb.Append(content);
|
sb.Append(content);
|
||||||
}
|
}
|
||||||
@@ -449,8 +478,8 @@ namespace XCharts
|
|||||||
string content = itemFormatter;
|
string content = itemFormatter;
|
||||||
FormatterHelper.ReplaceContent(ref content, dataIndex, tooltip.numericFormatter, serie, chart, dataZoom);
|
FormatterHelper.ReplaceContent(ref content, dataIndex, tooltip.numericFormatter, serie, chart, dataZoom);
|
||||||
if (!first) sb.Append(FormatterHelper.PH_NN);
|
if (!first) sb.Append(FormatterHelper.PH_NN);
|
||||||
var dotColorIndex = serie.type == SerieType.Pie || serie.type == SerieType.Radar
|
var dotColorIndex = serie.type == SerieType.Pie || serie.type == SerieType.Radar ||
|
||||||
|| serie.type == SerieType.Ring ? dataIndex : i;
|
serie.type == SerieType.Ring ? dataIndex : i;
|
||||||
sb.Append(ChartCached.ColorToDotStr(chart.theme.GetColor(dotColorIndex)));
|
sb.Append(ChartCached.ColorToDotStr(chart.theme.GetColor(dotColorIndex)));
|
||||||
sb.Append(content);
|
sb.Append(content);
|
||||||
first = false;
|
first = false;
|
||||||
|
|||||||
@@ -528,12 +528,12 @@ namespace XCharts
|
|||||||
m_ChartMaxAnchor, m_ChartPivot, m_ChartSizeDelta);
|
m_ChartMaxAnchor, m_ChartPivot, m_ChartSizeDelta);
|
||||||
m_SerieLabelRoot.hideFlags = chartHideFlags;
|
m_SerieLabelRoot.hideFlags = chartHideFlags;
|
||||||
SerieLabelPool.ReleaseAll(m_SerieLabelRoot.transform);
|
SerieLabelPool.ReleaseAll(m_SerieLabelRoot.transform);
|
||||||
int count = 0;
|
|
||||||
for (int i = 0; i < m_Series.Count; i++)
|
for (int i = 0; i < m_Series.Count; i++)
|
||||||
{
|
{
|
||||||
var serie = m_Series.list[i];
|
var serie = m_Series.list[i];
|
||||||
serie.index = i;
|
serie.index = i;
|
||||||
SerieHelper.UpdateCenter(serie, chartPosition, chartWidth, chartHeight);
|
SerieHelper.UpdateCenter(serie, chartPosition, chartWidth, chartHeight);
|
||||||
|
int count = 0;
|
||||||
for (int j = 0; j < serie.data.Count; j++)
|
for (int j = 0; j < serie.data.Count; j++)
|
||||||
{
|
{
|
||||||
var serieData = serie.data[j];
|
var serieData = serie.data[j];
|
||||||
|
|||||||
@@ -266,6 +266,8 @@ namespace XCharts
|
|||||||
var offset = new Vector3(textStyle.offset.x, textStyle.offset.y);
|
var offset = new Vector3(textStyle.offset.x, textStyle.offset.y);
|
||||||
AxisHelper.AdjustCircleLabelPos(txt, pos, radar.runtimeCenterPos, txtHig, offset);
|
AxisHelper.AdjustCircleLabelPos(txt, pos, radar.runtimeCenterPos, txtHig, offset);
|
||||||
}
|
}
|
||||||
|
if(chart.tooltip.gameObject != null)
|
||||||
|
chart.tooltip.gameObject.transform.SetSiblingIndex(chart.transform.childCount-1);
|
||||||
chart.RefreshBasePainter();
|
chart.RefreshBasePainter();
|
||||||
};
|
};
|
||||||
radar.refreshComponent.Invoke();
|
radar.refreshComponent.Invoke();
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ namespace XCharts
|
|||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
public class XChartsMgr : MonoBehaviour
|
public class XChartsMgr : MonoBehaviour
|
||||||
{
|
{
|
||||||
internal static string _version = "2.8.1";
|
internal static string _version = "2.8.2";
|
||||||
internal static int _versionDate = 20220506;
|
internal static int _versionDate = 20220815;
|
||||||
public static string version { get { return _version; } }
|
public static string version { get { return _version; } }
|
||||||
public static int versionDate { get { return _versionDate; } }
|
public static int versionDate { get { return _versionDate; } }
|
||||||
public static string fullVersion { get { return version + "-" + versionDate; } }
|
public static string fullVersion { get { return version + "-" + versionDate; } }
|
||||||
|
|||||||
@@ -1183,7 +1183,8 @@ namespace XUGL
|
|||||||
float smoothness, int gradientType = 0, bool isYAxis = false)
|
float smoothness, int gradientType = 0, bool isYAxis = false)
|
||||||
{
|
{
|
||||||
if (radius == 0) return;
|
if (radius == 0) return;
|
||||||
if (space > 0 && Mathf.Abs(toDegree - startDegree) >= 360) space = 0;
|
var isCircle = Mathf.Abs(toDegree - startDegree) >= 360;
|
||||||
|
if (space > 0 && isCircle) space = 0;
|
||||||
radius -= borderWidth;
|
radius -= borderWidth;
|
||||||
smoothness = (smoothness < 0 ? 2f : smoothness);
|
smoothness = (smoothness < 0 ? 2f : smoothness);
|
||||||
int segments = (int) ((2 * Mathf.PI * radius) * (Mathf.Abs(toDegree - startDegree) / 360) / smoothness);
|
int segments = (int) ((2 * Mathf.PI * radius) * (Mathf.Abs(toDegree - startDegree) / 360) / smoothness);
|
||||||
@@ -1223,7 +1224,7 @@ namespace XUGL
|
|||||||
if (realToAngle < realStartAngle) realToAngle = realStartAngle;
|
if (realToAngle < realStartAngle) realToAngle = realStartAngle;
|
||||||
p2 = UGLHelper.GetPos(center, radius, realStartAngle);
|
p2 = UGLHelper.GetPos(center, radius, realStartAngle);
|
||||||
}
|
}
|
||||||
if (needBorder)
|
if (needBorder && !isCircle)
|
||||||
{
|
{
|
||||||
borderDiff = borderLineWidth / Mathf.Sin(halfAngle);
|
borderDiff = borderLineWidth / Mathf.Sin(halfAngle);
|
||||||
realCenter += borderDiff * middleDire;
|
realCenter += borderDiff * middleDire;
|
||||||
@@ -1259,9 +1260,9 @@ namespace XUGL
|
|||||||
{
|
{
|
||||||
p4 = new Vector3(p3.x, realCenter.y);
|
p4 = new Vector3(p3.x, realCenter.y);
|
||||||
var dist = p4.x - realCenter.x;
|
var dist = p4.x - realCenter.x;
|
||||||
var tcolor = Color32.Lerp(color, toColor, dist >= 0
|
var tcolor = Color32.Lerp(color, toColor, dist >= 0 ?
|
||||||
? dist / radius
|
dist / radius :
|
||||||
: Mathf.Min(radius + dist, radius) / radius);
|
Mathf.Min(radius + dist, radius) / radius);
|
||||||
if (isLeft && (i == segments || i == 0)) tcolor = toColor;
|
if (isLeft && (i == segments || i == 0)) tcolor = toColor;
|
||||||
DrawQuadrilateral(vh, lastP4, p2, p3, p4, lastColor, tcolor);
|
DrawQuadrilateral(vh, lastP4, p2, p3, p4, lastColor, tcolor);
|
||||||
lastP4 = p4;
|
lastP4 = p4;
|
||||||
@@ -1374,6 +1375,7 @@ namespace XUGL
|
|||||||
insideRadius += borderWidth;
|
insideRadius += borderWidth;
|
||||||
smoothness = smoothness < 0 ? 2f : smoothness;
|
smoothness = smoothness < 0 ? 2f : smoothness;
|
||||||
Vector3 p1, p2, p3, p4, e1, e2;
|
Vector3 p1, p2, p3, p4, e1, e2;
|
||||||
|
var isCircle = Mathf.Abs(toDegree - startDegree) >= 360;
|
||||||
var needBorder = borderWidth != 0;
|
var needBorder = borderWidth != 0;
|
||||||
var needSpace = space != 0;
|
var needSpace = space != 0;
|
||||||
var diffAngle = Mathf.Abs(toDegree - startDegree) * Mathf.Deg2Rad;
|
var diffAngle = Mathf.Abs(toDegree - startDegree) * Mathf.Deg2Rad;
|
||||||
@@ -1441,7 +1443,7 @@ namespace XUGL
|
|||||||
p2 = UGLHelper.GetPos(center, outsideRadius, realStartOutAngle, false);
|
p2 = UGLHelper.GetPos(center, outsideRadius, realStartOutAngle, false);
|
||||||
e2 = UGLHelper.GetPos(center, outsideRadius, realToOutAngle, false);
|
e2 = UGLHelper.GetPos(center, outsideRadius, realToOutAngle, false);
|
||||||
}
|
}
|
||||||
if (needBorder)
|
if (needBorder && !isCircle)
|
||||||
{
|
{
|
||||||
var borderDiff = borderWidth / Mathf.Sin(halfAngle);
|
var borderDiff = borderWidth / Mathf.Sin(halfAngle);
|
||||||
realCenter += Mathf.Abs(borderDiff) * middleDire;
|
realCenter += Mathf.Abs(borderDiff) * middleDire;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "com.monitor1394.xcharts",
|
"name": "com.monitor1394.xcharts",
|
||||||
"displayName": "XCharts",
|
"displayName": "XCharts",
|
||||||
"version": "2.8.1",
|
"version": "2.8.2",
|
||||||
"date": "20220506",
|
"date": "20220815",
|
||||||
"checkdate": "20220506",
|
"checkdate": "20220815",
|
||||||
"desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!",
|
"desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"description": "A charting and data visualization library for Unity.",
|
"description": "A charting and data visualization library for Unity.",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": "2.8.1",
|
"version": "2.8.2",
|
||||||
"date": "20220506",
|
"date": "20220815",
|
||||||
"checkdate": "20220506",
|
"checkdate": "20220815",
|
||||||
"desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!",
|
"desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!",
|
||||||
"homepage": "https://github.com/monitor1394/unity-ugui-XCharts"
|
"homepage": "https://github.com/monitor1394/unity-ugui-XCharts"
|
||||||
}
|
}
|
||||||
@@ -9,15 +9,15 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 0}
|
m_GameObject: {fileID: 0}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 0}
|
m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: UnityEditor:UnityEditor.PackageManager.UI:PackageManagerProjectSettings
|
m_EditorClassIdentifier:
|
||||||
m_ScopedRegistriesSettingsExpanded: 1
|
m_ScopedRegistriesSettingsExpanded: 1
|
||||||
oneTimeWarningShown: 0
|
oneTimeWarningShown: 0
|
||||||
m_Registries:
|
m_Registries:
|
||||||
- m_Id: main
|
- m_Id: main
|
||||||
m_Name:
|
m_Name:
|
||||||
m_Url: https://packages.unity.cn
|
m_Url: https://packages.unity.com
|
||||||
m_Scopes: []
|
m_Scopes: []
|
||||||
m_IsDefault: 1
|
m_IsDefault: 1
|
||||||
m_UserSelectedRegistryName:
|
m_UserSelectedRegistryName:
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
m_EditorVersion: 2019.4.13f1c1
|
m_EditorVersion: 2019.4.39f1
|
||||||
m_EditorVersionWithRevision: 2019.4.13f1c1 (ddecf0c37a3b)
|
m_EditorVersionWithRevision: 2019.4.39f1 (78d14dfa024b)
|
||||||
|
|||||||
Reference in New Issue
Block a user