This commit is contained in:
monitor1394
2022-05-22 22:17:38 +08:00
parent 003f4da9de
commit bafe032bb9
391 changed files with 3718 additions and 2774 deletions

View File

@@ -1,6 +1,5 @@

using UnityEngine;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace XCharts.Runtime
@@ -91,6 +90,7 @@ namespace XCharts.Runtime
return true;
}
}
[SerializeField] private bool m_Show;
[SerializeField] private Shape m_Shape;
[SerializeField] private float m_Radius = 100;
@@ -281,12 +281,13 @@ namespace XCharts.Runtime
m_Radius = 0.35f;
m_SplitNumber = 5;
m_Indicator = true;
m_IndicatorList = new List<Indicator>(5){
new Indicator(){name="indicator1",max = 0},
new Indicator(){name="indicator2",max = 0},
new Indicator(){name="indicator3",max = 0},
new Indicator(){name="indicator4",max = 0},
new Indicator(){name="indicator5",max = 0},
m_IndicatorList = new List<Indicator>(5)
{
new Indicator() { name = "indicator1", max = 0 },
new Indicator() { name = "indicator2", max = 0 },
new Indicator() { name = "indicator3", max = 0 },
new Indicator() { name = "indicator4", max = 0 },
new Indicator() { name = "indicator5", max = 0 },
};
center[0] = 0.5f;
center[1] = 0.4f;

View File

@@ -1,6 +1,5 @@
using UnityEngine;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace XCharts.Runtime

View File

@@ -1,6 +1,5 @@
using UnityEngine;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using XUGL;
@@ -24,8 +23,8 @@ namespace XCharts.Runtime
return;
}
var radar = component;
radar.context.isPointerEnter = radar.show
&& Vector3.Distance(radar.context.center, chart.pointerPos) <= radar.context.radius;
radar.context.isPointerEnter = radar.show &&
Vector3.Distance(radar.context.center, chart.pointerPos) <= radar.context.radius;
}
public override void DrawBase(VertexHelper vh)
@@ -37,11 +36,11 @@ namespace XCharts.Runtime
{
float txtHig = 20;
radar.painter = chart.GetPainter(radar.index);
radar.refreshComponent = delegate ()
radar.refreshComponent = delegate()
{
radar.UpdateRadarCenter(chart.chartPosition, chart.chartWidth, chart.chartHeight);
var radarObject = ChartHelper.AddObject("Radar" + radar.index, chart.transform, chart.chartMinAnchor,
chart.chartMaxAnchor, chart.chartPivot, chart.chartSizeDelta);
chart.chartMaxAnchor, chart.chartPivot, chart.chartSizeDelta);
radar.gameObject = radarObject;
radar.gameObject.hideFlags = chart.chartHideFlags;
ChartHelper.HideAllObject(radarObject.transform, INDICATOR_TEXT);
@@ -52,7 +51,7 @@ namespace XCharts.Runtime
var objName = INDICATOR_TEXT + "_" + i;
var label = ChartHelper.AddChartLabel(objName, radarObject.transform, radar.axisName.labelStyle,
chart.theme.common, radar.GetFormatterIndicatorContent(i), Color.clear, TextAnchor.MiddleCenter);
chart.theme.common, radar.GetFormatterIndicatorContent(i), Color.clear, TextAnchor.MiddleCenter);
label.SetActive(radar.indicator && radar.axisName.labelStyle.show);
AxisHelper.AdjustCircleLabelPos(label, pos, radar.context.center, txtHig, radar.axisName.labelStyle.offset);
}
@@ -95,7 +94,7 @@ namespace XCharts.Runtime
if (radar.splitArea.show)
{
UGL.DrawDoughnut(vh, p, insideRadius, outsideRadius, color, Color.clear,
0, 360, chart.settings.cicleSmoothness);
0, 360, chart.settings.cicleSmoothness);
}
if (radar.splitLine.show)
{