Skip to content

Function: strip() ​

ts
function strip(options): StripFigure;

Build a strip plot figure from a table, like plotly.py's px.strip: box traces with boxpoints: 'all', pointpos: 0, hoveron: 'points', a transparent fill and no outline, one per color group (with offsetgroup = the group, so boxmode: 'group' sets them side by side). Differences from px: the outline is removed with line.width: 0 rather than a transparent line color (so the points keep the trace color from the colorway), and jitter is an option.

Parameters ​

ParameterType
optionsStripFigureOptions

Returns ​

StripFigure

Example ​

ts
import { createChart, strip } from '@mk7s/holochart';

const figure = strip({
  data: [
    { day: 'Thu', bill: 17.2, smoker: 'No' },
    { day: 'Fri', bill: 21.0, smoker: 'Yes' },
  ],
  x: 'day',
  y: 'bill',
  color: 'smoker',
});
createChart(el, figure);

Released under the MIT License.