Example #1
0
 /// <summary>
 /// Set data label options to all data series.
 /// </summary>
 /// <param name="Options">Data label customization options.</param>
 public void SetGroupDataLabelOptions(SLGroupDataLabelOptions Options)
 {
     foreach (SLDataSeries ser in this.PlotArea.DataSeries)
     {
         ser.GroupDataLabelOptions = Options.Clone();
     }
 }
Example #2
0
        /// <summary>
        /// Set data label options to a specific data series.
        /// </summary>
        /// <param name="DataSeriesIndex">The index of the data series. This is 1-based indexing, so it's 1 for the 1st data series, 2 for the 2nd data series and so on.</param>
        /// <param name="Options">Data label customization options.</param>
        public void SetGroupDataLabelOptions(int DataSeriesIndex, SLGroupDataLabelOptions Options)
        {
            // why not just return if outside of range? Because I assume you counted wrongly.
            if (DataSeriesIndex < 1) DataSeriesIndex = 1;
            if (DataSeriesIndex > this.PlotArea.DataSeries.Count) DataSeriesIndex = this.PlotArea.DataSeries.Count;
            // to get it to 0-index
            --DataSeriesIndex;

            this.PlotArea.DataSeries[DataSeriesIndex].GroupDataLabelOptions = Options.Clone();
        }