Search Results for

    Show / Hide Table of Contents

    Interface IChartSeries

    Interface that represents single series within chart.

    Namespace: IronXL.Drawing.Charts
    Assembly: IronXL.dll
    Syntax
    public interface IChartSeries

    IChartSeries is the single data series a developer gets back after attaching a range of cells to an Excel chart. Each series represents one plotted line, bar set, or pie slice group inside an IChart, and the contract lets code name that series so it reads clearly in the chart legend. A chart with several series, such as revenue against cost, holds one IChartSeries per data set, each labeled independently.

    A developer never constructs an IChartSeries directly. IChart.AddSeries returns one each time a cell range is added to a chart, whether through AddSeries(string values) for a single range or AddSeries(string xRange, string yRange) for paired ranges. The contract exposes a Title property, readable and writable, which sets the label shown for that series in the legend. Reading it reports the current label, and assigning it renames the series in place. Set the Title after adding the series and before calling Plot on the parent chart, so the rendered chart carries meaningful series names rather than the default range references.

    IChartSeries series = chart.AddSeries("B1:B10");
    series.Title = "Revenue";

    The create a line chart example plots series from cell data, and the create and edit a chart how-to walks through naming and styling them.

    Properties

    Title

    Gets or sets the title of the series.

    Declaration
    string Title { get; set; }
    Property Value
    Type Description
    System.String
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget