增加AreaAlpha控制RadarChart的Area透明度

This commit is contained in:
monitor1394
2019-06-20 19:11:06 +08:00
parent a0b50cae20
commit 0e52cfda7e
6 changed files with 759 additions and 16 deletions

View File

@@ -29,6 +29,7 @@ public class Demo : MonoBehaviour
private Color m_HighlightColor;
private ScrollRect m_ScrollRect;
private Mask m_Mark;
void Awake()
{
@@ -45,11 +46,13 @@ public class Demo : MonoBehaviour
m_PieChartModule = transform.Find("chart_detail/Viewport/pie_chart").gameObject;
m_RadarChartModule = transform.Find("chart_detail/Viewport/radar_chart").gameObject;
m_OtherModule = transform.Find("chart_detail/Viewport/other").gameObject;
m_Mark = transform.Find("chart_detail/Viewport").GetComponent<Mask>();
m_Mark.enabled = true;
m_Title = transform.Find("chart_title/Text").GetComponent<Text>();
InitChartButton();
InitThemeButton();
InitChartButton();
}
void Update()
@@ -129,6 +132,7 @@ public class Demo : MonoBehaviour
{
m_Title.text = "其他";
}
SelecteTheme(m_SelectedTheme);
}
void SetButtonColor(Button btn, GameObject selected, GameObject module)

View File

@@ -3310,11 +3310,11 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 1304910232274802, guid: 3aced18ddab0f41408ea7b63aeaf8ea4, type: 2}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1300022869546272, guid: 3aced18ddab0f41408ea7b63aeaf8ea4, type: 2}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 224656923350714028, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
@@ -4217,6 +4217,731 @@ Prefab:
propertyPath: m_YAxis.m_MinMaxType
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114825093584764866, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224477228889141886, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224990228136134292, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224990228136134292, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224990228136134292, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224990228136134292, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224990228136134292, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224640409115326060, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224640409115326060, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224640409115326060, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224640409115326060, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224640409115326060, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224137588429429520, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224137588429429520, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224137588429429520, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224137588429429520, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224137588429429520, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224033984334799064, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224950028669412592, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224351582585875638, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224351582585875638, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224351582585875638, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224351582585875638, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224351582585875638, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224378420126718858, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224378420126718858, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224378420126718858, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224378420126718858, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224378420126718858, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224980883306932838, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224980883306932838, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224980883306932838, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224980883306932838, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224980883306932838, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224700194107766708, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224639766279868962, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224639766279868962, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224639766279868962, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224639766279868962, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224639766279868962, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224592279312807170, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224592279312807170, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224592279312807170, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224592279312807170, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224592279312807170, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224837641532069322, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224685339434104426, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224685339434104426, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224685339434104426, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224685339434104426, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224685339434104426, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224016570229972892, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224016570229972892, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224016570229972892, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224016570229972892, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224016570229972892, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224921633990709334, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224921633990709334, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224921633990709334, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224921633990709334, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224921633990709334, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224057971753766028, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224997530927183164, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224997530927183164, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224997530927183164, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224997530927183164, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224997530927183164, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224263193572396852, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224263193572396852, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224263193572396852, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224263193572396852, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224263193572396852, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224396775092399102, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224396775092399102, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224396775092399102, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224396775092399102, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224396775092399102, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224872670054354250, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224872670054354250, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224872670054354250, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224872670054354250, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224872670054354250, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224541189218901384, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224541189218901384, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224541189218901384, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224541189218901384, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224541189218901384, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224414813553012114, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224414813553012114, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224414813553012114, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224414813553012114, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224414813553012114, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224692365940091262, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224692365940091262, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224692365940091262, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224692365940091262, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224692365940091262, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224715418974785918, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224715418974785918, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224715418974785918, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224715418974785918, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224715418974785918, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224131359271621996, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224131359271621996, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224131359271621996, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224131359271621996, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224131359271621996, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224835380762690200, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224337200889953410, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224813917384005258, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224813917384005258, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224813917384005258, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224813917384005258, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224813917384005258, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224939668699118868, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224939668699118868, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224939668699118868, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224939668699118868, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224939668699118868, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224740476959372280, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224667221064257520, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224730429824422084, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224730429824422084, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224730429824422084, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224730429824422084, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224730429824422084, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224836770832375026, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224836770832375026, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224836770832375026, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224836770832375026, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224836770832375026, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224844223927976434, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224550326068596348, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224550326068596348, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224550326068596348, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224550326068596348, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224550326068596348, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224966550259840404, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224966550259840404, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224966550259840404, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224966550259840404, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224966550259840404, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224628753576615150, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 224740194497517932, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 414
objectReference: {fileID: 0}
- target: {fileID: 224740194497517932, guid: 3aced18ddab0f41408ea7b63aeaf8ea4,
type: 2}
propertyPath: m_SizeDelta.x
value: 56
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 3aced18ddab0f41408ea7b63aeaf8ea4, type: 2}
m_IsPrefabParent: 0

View File

@@ -17,8 +17,9 @@ namespace XCharts
SerializedProperty m_Bottom;
SerializedProperty m_LineTickness;
SerializedProperty m_LinePointSize;
SerializedProperty m_LineColor;
SerializedProperty m_BackgroundColorList;
SerializedProperty m_LineColor;
SerializedProperty m_AreaAlpha;
SerializedProperty m_Indicator;
SerializedProperty m_IndicatorList;
@@ -43,6 +44,7 @@ namespace XCharts
m_LineTickness = prop.FindPropertyRelative("m_LineTickness");
m_LinePointSize = prop.FindPropertyRelative("m_LinePointSize");
m_LineColor = prop.FindPropertyRelative("m_LineColor");
m_AreaAlpha = prop.FindPropertyRelative("m_AreaAlpha");
m_BackgroundColorList = prop.FindPropertyRelative("m_BackgroundColorList");
m_Indicator = prop.FindPropertyRelative("m_Indicator");
m_IndicatorList = prop.FindPropertyRelative("m_IndicatorList");
@@ -97,6 +99,8 @@ namespace XCharts
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_LinePointSize);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_AreaAlpha);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
EditorGUI.PropertyField(drawRect, m_LineColor);
drawRect.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
@@ -124,7 +128,7 @@ namespace XCharts
int propNum = 1;
if (m_RadarModuleToggle)
{
propNum += 12;
propNum += 13;
if (m_BackgroundColorToggle)
{

View File

@@ -9,13 +9,13 @@ namespace XCharts
public class Radar : JsonDataSupport, IEquatable<Radar>
{
[System.Serializable]
public class Indicator: IEquatable<Indicator>
public class Indicator : IEquatable<Indicator>
{
[SerializeField] private string m_Name;
[SerializeField] private float m_Max;
public string name { get { return m_Name; }set { m_Name = value; } }
public float max { get { return m_Max; }set { m_Max = value; } }
public string name { get { return m_Name; } set { m_Name = value; } }
public float max { get { return m_Max; } set { m_Max = value; } }
public Indicator Clone()
{
@@ -46,6 +46,8 @@ namespace XCharts
[SerializeField] private float m_LineTickness = 1f;
[SerializeField] private float m_LinePointSize = 5f;
[SerializeField] private Color m_LineColor = Color.grey;
[Range(0, 255)]
[SerializeField] private int m_AreaAlpha;
[SerializeField] private List<Color> m_BackgroundColorList = new List<Color>();
[SerializeField] private bool m_Indicator = true;
@@ -65,13 +67,15 @@ namespace XCharts
public float lineTickness { get { return m_LineTickness; } set { m_LineTickness = value; } }
public float linePointSize { get { return m_LinePointSize; } set { m_LinePointSize = value; } }
public Color lineColor { get { return m_LineColor; } set { m_LineColor = value; } }
public int areaAipha { get { return m_AreaAlpha; } set { m_AreaAlpha = value; } }
public List<Color> backgroundColorList { get { return m_BackgroundColorList; } }
public bool indicator { get { return m_Indicator; } set { m_Indicator = value; } }
public List<Indicator> indicatorList { get { return m_IndicatorList; } }
public static Radar defaultRadar
{
get {
get
{
var radar = new Radar
{
m_Cricle = false,
@@ -84,6 +88,7 @@ namespace XCharts
m_Bottom = 0,
m_LineTickness = 1f,
m_LinePointSize = 5f,
m_AreaAlpha = 150,
m_LineColor = Color.grey,
m_Indicator = true,
m_BackgroundColorList = new List<Color> {
@@ -105,6 +110,7 @@ namespace XCharts
m_Top = other.top;
m_Bottom = other.bottom;
m_Indicator = other.indicator;
m_AreaAlpha = other.areaAipha;
indicatorList.Clear();
foreach (var d in other.indicatorList) indicatorList.Add(d.Clone());
}
@@ -141,10 +147,10 @@ namespace XCharts
IsEqualsIndicatorList(indicatorList, other.indicatorList);
}
private bool IsEqualsIndicatorList(List<Indicator> indicators1,List<Indicator> indicators2)
private bool IsEqualsIndicatorList(List<Indicator> indicators1, List<Indicator> indicators2)
{
if (indicators1.Count != indicators2.Count) return false;
for(int i = 0; i < indicators1.Count; i++)
for (int i = 0; i < indicators1.Count; i++)
{
var indicator1 = indicators1[i];
var indicator2 = indicators2[i];
@@ -186,7 +192,8 @@ namespace XCharts
MatchCollection m = Regex.Matches(jsonData, pattern);
foreach (Match match in m)
{
m_IndicatorList.Add(new Indicator() {
m_IndicatorList.Add(new Indicator()
{
name = match.Groups[1].Value
});
}
@@ -198,7 +205,7 @@ namespace XCharts
int index = 0;
foreach (Match match in m)
{
if (m_IndicatorList[index]!=null)
if (m_IndicatorList[index] != null)
{
m_IndicatorList[index].max = int.Parse(match.Groups[1].Value);
}

View File

@@ -152,8 +152,9 @@ namespace XCharts
}
var dataList = m_Series.series[i].data;
var color = m_ThemeInfo.GetColor(i);
var areaColor = new Color(color.r, color.g, color.b, color.a * 0.7f);
var areaColor = color;
areaColor.a = (byte)m_Radar.areaAipha;
List<Vector3> pointList = new List<Vector3>(dataList.Count);
dataPosList.Add(pointList);
for (int j = 0; j < dataList.Count; j++)
@@ -161,7 +162,8 @@ namespace XCharts
var max = m_Radar.indicatorList[j].max > 0 ?
m_Radar.indicatorList[j].max :
GetMaxValue(j);
var radius = max<0? m_Radar.radius - m_Radar.radius * dataList[j] / max : m_Radar.radius * dataList[j] / max ;
var radius = max < 0 ? m_Radar.radius - m_Radar.radius * dataList[j] / max
: m_Radar.radius * dataList[j] / max;
var currAngle = j * angle;
if (j == 0)
{

View File

@@ -20,6 +20,7 @@ UGUI图表库风格参考了[`ECharts`](https://www.echartsjs.com/examples/#c
![Dark](Doc/dark.png)
# 更新日志
* 2019.06.20) 增加`AreaAlpha`控制`RadarChart``Area`透明度
* 2019.06.13)增加`DataZoom`实现区域缩放
* 2019.06.01`LineChart`增加`stepType`实现`阶梯线图`
* 2019.05.29`BarChart`增加`InSameBar`实现非堆叠同柱