SparkWinLossChart: {
    barSize?: number;
    data: number[];
    gap?: number;
    lossFillStyle?: FillStyle;
    strokeStyle?: LineStyle;
    threshold?: number;
    type: "spark-win-loss";
    winFillStyle?: FillStyle;
}

Description of a Spark Win-Loss Chart.

Displays a miniature win-loss chart.

Can be used with DataGrid.

 // Example, win-loss chart in a DataGrid
DataGrid.setCellContent(0, 0, {
type: 'spark-win-loss',
data: [0, 10, 6, 4, 9, 8, 3, 6],
threshold: 5,
})

Type declaration

  • Optional barSize?: number

    Size of bar relative to gap.

     // Example, bar = 2 times as wide as gap between bars.
    barSize: 2,
    gap: 1
  • data: number[]

    Data as list of numbers.

     // Example,
    data: [ 10, 5, 8, 5, 2 ]
  • Optional gap?: number

    Size of gap between bars relative to width of each bar.

     // Example, bar = 2 times as wide as gap between bars.
    barSize: 2,
    gap: 1
  • Optional lossFillStyle?: FillStyle

    Optional fill style for "loss" bars.

  • Optional strokeStyle?: LineStyle

    Optional stroke style bars.

  • Optional threshold?: number

    Win-loss threshold. Data values above this are considered as "win" and below "loss".

  • type: "spark-win-loss"

    Identifier that is used to select the spark chart type.

  • Optional winFillStyle?: FillStyle

    Optional fill style for "win" bars.