SparkFrame

Spark frames are based on sparklines, there is a Spark* equivalent to the three frames that will render the frame as a <span> so it can be placed in a <p>. Its height (and width if not set) are based on the computed line-height of the line it is embedded in. By default, all Spark frames have margin: 0 regardless of whether they have titles or axes, if you pass an explicit margin prop, you can override this.

<SparkNetworkFrame /> is a wrapper around NetworkFrame. Some of the built-in defaults of the frame are different from the usual NetworkFrame:

  • networkType has the following default settings (in order to make the network drawing work best in such a small space):
      edgeStrength: 2
      edgeDistance: 5
      nodePadding: 1
      nodeWidth: 5
      groupWidth: 4
  • nodeSizeAccessor has a default setting of 2 for small spark-sized nodes.

<SparkXYFrame /> is a wrapper around XYFrame. It also has a slightly different default for the axes prop:

  • axes will by default be modified so that any passed axes will have tickFormat: () => "" set to hide ticks and baseline: false. If you pass a setting for either of these you can override these defaults.

<SparkOrdinalFrame /> is a wrapper around OrdinalFrame. Its only difference in defaults is the margin settings shared by all spark frames.