No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.

Cursor Modes

The cursor is set by default to different modes according to the type of chart and x-axis. Whether it is for selection or zooming, the cursor either follows one axis, or both axes.

Both axes - XY (example: selection)One axis - X or Y (example: zoom)
X and YX or Y

Default behavior

The current implementation follows those rules:

Chart typex-axis typeActionBehavior
HistogramValueZoomX
HistogramValueSelectionXY
ScatterplotValueZoomXY
ScatterplotValueSelectionXY
Bar chartCategoryZoomX (or Y when rotated)
Bar chartCategorySelectionXY
Bar chartDateZoomX (or Y when rotated)
Bar chartDateSelectionXY
Line chartCategoryZoomX (or Y when rotated)
Line chartCategorySelectionX (or Y when rotated)
Line chartNumberZoomXY
Line chartNumberSelectionXY
Line chartDateZoomXY
Line chartDateSelectionXY
Box plotCategoryZoomXY
Box plotCategorySelectionXY

Customized behavior

You can modify the default behavior for a chart by setting the component's cursorRange property to one of those value:

MultiAxes: "multi-axes", XAxis: "x-axis", YAxis: "y-axis"

example:

myChartComponent.cursorRange = "x-axis";