Class XlsxSparkline
- Namespace
- DocToolkit
- Assembly
- DocToolkit.Xlsx.dll
A sparkline: a small chart drawn inside one cell, summarising a range on the same sheet.
public sealed class XlsxSparkline
- Inheritance
-
XlsxSparkline
- Inherited Members
Remarks
Unlike XlsxTable or a conditional rule, a sparkline names two places — the cell it is drawn in, and the range it reads. Both are on the sheet Format(byte[], string, XlsxFormat) is given, and neither may carry a sheet qualifier.
Properties
Cell
The cell the sparkline is drawn in, such as D1. A single cell, not a range.
public string Cell { get; }
Property Value
Kind
The sparkline's shape.
public XlsxSparklineKind Kind { get; }
Property Value
SourceRange
The range the sparkline summarises, such as A1:C1.
public string SourceRange { get; }
Property Value
Methods
At(string, string, XlsxSparklineKind)
Draws a sparkline in cell from sourceRange.
public static XlsxSparkline At(string cell, string sourceRange, XlsxSparklineKind kind = XlsxSparklineKind.Line)
Parameters
cellstringThe cell to draw in, such as
D1. A single cell, not a range.sourceRangestringThe range to summarise, such as
A1:C1.kindXlsxSparklineKindThe shape. Defaults to Line.
Returns
Exceptions
- ArgumentNullException
Either string argument is null.
- ArgumentException
cellorsourceRangeis blank or names a sheet.