mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
3.0
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user