What is bridle?

Bridle is a repository of charts built following the reusable chart paradigm. The library is in its infancy, and still requires a bunch of work. We decided to still use d3 to invoke the chart, so that you can integrate them in your d3 workflow as seamlessly as possible:

Usage

First of all you create a chart generator by invoking the function of the chart you want to use:

  var chart = Bridle.LineChart()

This call returns a chart generator function, much like d3.axis returns an axis generator. In order to customise the chart, you can call the different getters/setters of the function:

  chart
    .width(900)
    .height(400)
    .title('Oranges are healthy')
    .yAxisTitle('Vitamin C content')

Once you have setup your generator, just use d3 to render the chart:

  d3.select('#line-chart')
    .datum(data) // pass it your data object
    .call(chart) // and have d3 call your chart generator

For more information about why we use this paradigm, please refer to the article Towards Reusable Charts by d3.s creator, Michael Bostock.

What’s in a name?

At Pearson Technology we’re building a data analytics project called Palomino. Palomino is a coat colour in horses, and since this library is part of the Palomino project, we chose something horse related. The idea is that the bridle is what helps you direct a horse and connects you to it.