using UnityEngine; using UnityEngine.UI; using XCharts; public class Demo : MonoBehaviour { private Theme m_SelectedTheme; private GameObject m_SelectedModule; private GameObject m_LineChartModule; private GameObject m_BarChartModule; private GameObject m_PieChartModule; private GameObject m_RadarChartModule; private GameObject m_OtherModule; private Button m_DefaultThemeButton; private Button m_LightThemeButton; private Button m_DarkThemeButton; private Button m_LineChartButton; private Button m_BarChartButton; private Button m_PieChartButton; private Button m_RadarChartButton; private Button m_OtherButton; private Text m_Title; private Color m_NormalColor; private Color m_SelectedColor; private Color m_HighlightColor; private ScrollRect m_ScrollRect; void Awake() { m_SelectedTheme = Theme.Default; m_NormalColor = ChartHelper.GetColor("#293C55FF"); m_SelectedColor = ChartHelper.GetColor("#e43c59ff"); m_HighlightColor = ChartHelper.GetColor("#0E151FFF"); m_ScrollRect = transform.Find("chart_detail").GetComponent(); m_LineChartModule = transform.Find("chart_detail/line_chart").gameObject; m_BarChartModule = transform.Find("chart_detail/bar_chart").gameObject; m_PieChartModule = transform.Find("chart_detail/pie_chart").gameObject; m_RadarChartModule = transform.Find("chart_detail/radar_chart").gameObject; m_OtherModule = transform.Find("chart_detail/other").gameObject; m_Title = transform.Find("chart_title/Text").GetComponent(); InitChartButton(); InitThemeButton(); } void Update() { } void InitChartButton() { m_LineChartButton = transform.Find("chart_list/btn_linechart").GetComponent