Пример #1
0
 public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)
 {
     if (active)
     {
         if (legend.itemAutoColor)
         {
             return(SeriesHelper.GetNameColor(chart, readIndex, legendName));
         }
         else
         {
             return(legend.GetColor(readIndex));
         }
     }
     else
     {
         return(chart.theme.legend.unableColor);
     }
 }
Пример #2
0
        public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)
        {
            var textStyle = legend.labelStyle.textStyle;

            if (active)
            {
                if (legend.labelStyle.textStyle.autoColor)
                {
                    return(SeriesHelper.GetNameColor(chart, legendIndex, legendName));
                }
                else
                {
                    return(!ChartHelper.IsClearColor(textStyle.color) ? textStyle.color : theme.legend.textColor);
                }
            }
            else
            {
                return(theme.legend.unableColor);
            }
        }