Example #1
0
        protected virtual void OnThemeChanged()
        {
            switch (m_Theme)
            {
            case Theme.Dark:
                m_ThemeInfo.Copy(ThemeInfo.Dark);
                break;

            case Theme.Default:
                m_ThemeInfo.Copy(ThemeInfo.Default);
                break;

            case Theme.Light:
                m_ThemeInfo.Copy(ThemeInfo.Light);
                break;
            }
            InitTitle();
            InitLegend();
        }
Example #2
0
 protected override void CheckComponent()
 {
     if (m_Series.anyDirty)
     {
         if (m_Series.vertsDirty)
         {
             RefreshChart();
         }
         if (SeriesHelper.IsLabelDirty(m_Series))
         {
             m_ReinitLabel = true;
         }
         if (SeriesHelper.IsNeedLabelUpdate(m_Series) && !m_RefreshChart)
         {
             m_RefreshLabel = true;
         }
         foreach (var serie in m_Series.list)
         {
             if (serie.titleStyle.componentDirty)
             {
                 m_ReinitTitle = true;
             }
             if (serie.nameDirty)
             {
                 m_Legend.SetAllDirty();
                 RefreshChart();
                 serie.ClearNameDirty();
             }
         }
         m_Series.ClearDirty();
     }
     if (m_ThemeInfo.anyDirty)
     {
         if (m_CheckTheme != m_ThemeInfo.theme)
         {
             m_CheckTheme = m_ThemeInfo.theme;
             m_ThemeInfo.Copy(m_CheckTheme);
             OnThemeChanged();
         }
         if (m_ThemeInfo.componentDirty)
         {
             m_Title.SetAllDirty();
             m_Legend.SetAllDirty();
             m_Tooltip.SetAllDirty();
         }
         if (m_ThemeInfo.vertsDirty)
         {
             RefreshChart();
         }
         m_ThemeInfo.ClearDirty();
     }
     if (m_Background.anyDirty)
     {
         if (m_Background.componentDirty)
         {
             InitBackground();
         }
         if (m_Background.vertsDirty)
         {
             RefreshChart();
         }
         m_Background.ClearDirty();
     }
     if (m_Title.anyDirty)
     {
         if (m_Title.componentDirty)
         {
             InitTitle();
         }
         if (m_Title.vertsDirty)
         {
             RefreshChart();
         }
         m_Title.ClearDirty();
     }
     if (m_Legend.anyDirty)
     {
         if (m_Legend.componentDirty)
         {
             InitLegend();
         }
         if (m_Legend.vertsDirty)
         {
             RefreshChart();
         }
         m_Legend.ClearDirty();
     }
     if (m_Tooltip.anyDirty)
     {
         if (m_Tooltip.componentDirty)
         {
             InitTooltip();
         }
         if (m_Tooltip.vertsDirty)
         {
             RefreshChart();
         }
         m_Tooltip.ClearDirty();
     }
     if (m_Settings.vertsDirty)
     {
         RefreshChart();
         m_Settings.ClearDirty();
     }
 }
 protected virtual void CheckComponent()
 {
     if (m_ThemeInfo.anyDirty)
     {
         if (m_CheckTheme != m_ThemeInfo.theme)
         {
             m_CheckTheme = m_ThemeInfo.theme;
             m_ThemeInfo.Copy(m_CheckTheme);
             OnThemeChanged();
         }
         if (m_ThemeInfo.componentDirty)
         {
             m_Title.SetAllDirty();
             m_Legend.SetAllDirty();
             m_Tooltip.SetAllDirty();
         }
         if (m_ThemeInfo.vertsDirty)
         {
             RefreshChart();
         }
         m_ThemeInfo.ClearDirty();
     }
     if (m_Title.anyDirty)
     {
         if (m_Title.componentDirty)
         {
             InitTitle();
         }
         if (m_Title.vertsDirty)
         {
             RefreshChart();
         }
         m_Title.ClearDirty();
     }
     if (m_Legend.anyDirty)
     {
         if (m_Legend.componentDirty)
         {
             InitLegend();
         }
         if (m_Legend.vertsDirty)
         {
             RefreshChart();
         }
         m_Legend.ClearDirty();
     }
     if (m_Tooltip.anyDirty)
     {
         if (m_Tooltip.componentDirty)
         {
             InitTooltip();
         }
         if (m_Tooltip.vertsDirty)
         {
             RefreshChart();
         }
         m_Tooltip.ClearDirty();
     }
     if (m_Settings.vertsDirty)
     {
         RefreshChart();
         m_Settings.ClearDirty();
     }
     if (m_Series.anyDirty)
     {
         if (m_Series.vertsDirty)
         {
             RefreshChart();
         }
         if (m_Series.labelDirty)
         {
             m_ReinitLabel = true;
         }
         if (m_Series.labelUpdate && !m_RefreshChart)
         {
             m_RefreshLabel = true;
         }
         foreach (var serie in m_Series.list)
         {
             if (serie.titleStyle.componentDirty)
             {
                 m_ReinitTitle = true;
             }
         }
         m_Series.ClearDirty();
     }
 }