This PR adds a new component that composes a Histogram and adds time data and animation status support.
The time support simply means that the x-axis is properly labeled with time data. The histogram now supports an x-axis-formatter function prop.
We probably should have the same prop on the Time Series so that users can provide the proper formatter based on their data aggregation (full date, months, quarters...etc). I think this would be better than adopting a string pattern that other libs like d3-time-format or moment support.
The animation part is completely optional, and if the prop is not there, it should look like a regular histogram.
If the animation property is there:
A Play / Pause button is added, which simply fires an event. We could consider removing this altogether and letting users compose their own version.
A scrubber will be rendered, based on the progress ([0, 100]) prop.
The scrubber will render inside the selection if there's any.
Clicking on the histogram will trigger a seek event, to notify the animation to move forward.
There's a little video-player-like hint on the scrubber.
I've tried to make it as compatible as possible with the brush.
Fix #534
This PR adds a new component that composes a Histogram and adds time data and animation status support.
The time support simply means that the x-axis is properly labeled with time data. The histogram now supports an x-axis-formatter function prop.
We probably should have the same prop on the Time Series so that users can provide the proper formatter based on their data aggregation (full date, months, quarters...etc). I think this would be better than adopting a string pattern that other libs like d3-time-format or moment support.
The animation part is completely optional, and if the prop is not there, it should look like a regular histogram.
If the animation property is there:
I've tried to make it as compatible as possible with the brush.