SparkBarChart: {
    barSize?: number;
    data: number[];
    fillStyle?: FillStyle;
    gap?: number;
    strokeStyle?: LineStyle;
    type: "spark-bar";
}

Description of a Spark Bar Chart.

Displays a miniature bar chart.

Can be used with DataGrid.

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

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 for bars.

     // Example,
    data: [ 10, 5, 8, 5, 2 ]
  • Optional fillStyle?: FillStyle

    Optional fill style for Bars.

  • 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 strokeStyle?: LineStyle

    Optional stroke style for Bars.

  • type: "spark-bar"

    Identifier that is used to select the spark chart type.