Esempio n. 1
0
        /// <summary>
        /// Set the color of specific plot components
        /// </summary>
        public void Style(
            Color?figureBackground = null,
            Color?dataBackground   = null,
            Color?grid             = null,
            Color?tick             = null,
            Color?axisLabel        = null,
            Color?titleLabel       = null)
        {
            settings.FigureBackground.Color = figureBackground ?? settings.FigureBackground.Color;
            settings.DataBackground.Color   = dataBackground ?? settings.DataBackground.Color;

            foreach (var axis in settings.Axes)
            {
                axis.Label(color: axisLabel);
                axis.TickLabelStyle(color: tick);
                axis.MajorGrid(color: grid);
                axis.MinorGrid(color: grid);
                if (tick.HasValue)
                {
                    axis.TickMarkColor(color: tick.Value);
                }
                axis.Line(color: tick);
            }

            XAxis2.TickLabelStyle(color: titleLabel);
        }