Remove Format, Improve Annotations
This is a minor bump because it breaks format
in Axis. We use numeral
a lot at Netflix and format
was a convenient way to just use numeral
style formatting but it required numeral
be a dependency for that one tiny feature. moment
was removed for the same reason.
The other breaking change is that previously pieceHoverAnnotation
would enable hover on individual pieces or on parts of a summary graphical object. This has been replaced with ORFrame having a summaryHoverAnnotation
to explicitly turn on one mode or the other.
This also adds some new built-in annotation types to XYFrame, vertical-points
and horizontal-points
which draw circles on all the points at the same (graphical) vertical or horizontal position. This was part of a larger modification of the annotation handling to move away from a simple hoverAnnotation={true}
to a system that lets you declare the kinds of annotations instantiated on hover rather than just the default frame-hover
and column-hover
. So now you can send objects that are basic annotation types or functions that return such objects or arrays of them, like this:
hoverAnnotation={[
{ type: "y", disable: ["connector", "note"] },
{ type: "x", disable: ["connector", "note"] },
d => ({ type: "xy", label: d.name }),
{ type: "frame-hover" },
{
type: "vertical-points",
threshold: 5,
r: (d, i) => i + 5
},
{
type: "horizontal-points",
threshold: 5,
r: (d, i) => i + 5
}
]}
Which will result in all sorts of annotations being called on hover and look something like this: