Bars grow in turn, then focus racks and the camera pushes in on the winner.

$npx kinetograph add bar-chart
Source

A small gap between bars makes it a histogram.

Props

Every prop has a default, so the component renders as it is. Change any of them in Studio or in code.

  • label

    string = "Export"

    The button label (the export that makes the number).

  • title

    string = "Renders this week"

    Small heading over the number in the finished chart.

  • value

    string = "24,815"

    The stat, as written.

  • deltaLead

    string = "5.8k"

    Bold lead of the line after the stat, e.g. "5.8k".

  • delta

    string = " more than the week before"

    The rest of that line.

  • series

    value = ['Last week', 'This week']

    The two legend entries: last period, this period.

  • days

    list

    X axis labels, spread evenly under the chart.

  • ticks

    list

    Y axis labels, top to bottom.

  • cells

    list

    The histogram, one string per row from the top: "#" a cell of this period, "." a cell of the last period, " " empty. Rows must be 52 wide.

  • settle

    number = 0.4

    Seconds the button spends settling from the press before the collapse starts (measured: the collapse starts at 0.4 s).

  • collapseAt

    number = 0.4

    Seconds when the label starts to dissolve and the pill to collapse.

  • collapseFor

    number = 0.233

    Seconds the collapse takes, ease-in: it arrives at full speed.

  • chartFor

    number = 0.533

    Seconds the chart takes to fade up around the square, starting as the square lands.

  • cutAt

    number = 1.2

    Seconds when the shot cuts out to the whole chart.

  • zoom

    number = 2.4

    Magnification of the close-up.

  • holdSeconds

    number = 0.533

    Seconds the whole chart holds after the cut.

  • accent

    colour = "#f79364"

    The colour of this period and of the button after it collapses.

  • accentTop

    colour = "#fb996b"

    A lighter accent, the top of each cell.

  • muted

    colour = "#e0e0de"

    Last period cells.

  • color

    colour = "#000000"

    The button and the stat.

  • background

    colour = "#f6f6f4"

    Background.

Compositions

  • BarChart