Skip to main content
100%

navigator chart with d3fc brush

✓ Published0🌍 Public
CColinEberhardt
Last edited Oct 18, 2017
Created on Nov 10, 2015

This example demonstrates a navigator chart that allows users to brush over a small overview to control the time range displayed in a larger detail chart. It plots surface temperature from weather data collected by the University of Edinburgh. The visualization uses the `d3fc` brush component (`fc.brushX`), which integrates with the `d3fc` Cartesian chart (`chartSvgCartesian`) and its series types (`seriesSvgArea`, `seriesSvgLine`). The brush selection is data-driven, updates the main chart’s domain, and enables efficient exploration of the dataset.

AI-generated description

This is a simple example of how to build a 'navigator' chart using the d3fc brush component. The example chart plots weather data collected by the University of Edinburgh.

The d3fc brush is built using the d3-brush component, but provides a simpler interface. This exampe highlights some of the d3fc-brush features:

  1. The brush is data-driven, with the location of the brush determined by the data supplied via a data join.
  2. The brush integrates with the d3fc cartesian chart component, with the extent of the brush automatically set based on the range of each axis.
  3. The d3fc-brush selection (which defines the brushed range), is represented as a percentage, whereas d3-brush uses pixels. The use of a percentage selection makes it easier to resize a brushed chart.
  4. The brush events expose utility functions for computing the axis domain based on the current selection, making it easier to handle brush events and update the chart.
mit Licensed

Similar vizzes