A collection of composable React components for building interactive data visualizations
OTHER License
Bot releases are hidden (Show)
Published by boygirl over 3 years ago
(2020-11-25)
This release adds a concept of global events that are attached to window
rather than to any of the elements rendered by Victory components. Global events are only supported for "parent" events that would normally be attached to svg
elements rendered by Victory's containerComponents. Events that should be global can be flagged by including onGlobal
in the name of the event handler. So, for example, use onGlobalMouseUp
rather than onMouseUp
to create a global mouse up handler.
VictoryBrushContainer
now uses global events in its defaultEvents
so that brushing continues even as the user's mouse moves outside of the chart area.
Published by boygirl over 3 years ago
Published by boygirl over 3 years ago
(2020-10-08)
#1708 - This PR adds ariaLabel
to Victory's primitive components (VictoryLabel
, Area
, Bar
etc.). This new prop can take a string or a function that expected to return a string, and adds aria-label
attributes to svg elements Victory renders. This PR also adds tabIndex
and aria-label
props to VictoryClipContainer
, and creates a new groupContainer
, VictoryAccessibleGroup
, which renders a g
tag and an optional desc
tag along with its other children. VictoryAccessibleGroup
also takes aria-label
and aria-describedby
props. Thanks @ljones87 for all the hard work on this new feature!
#1709 - Adds default onFocus
and onBlur
event handlers to VictoryTooltip
so that users can trigger tooltips by tabbing through the chart elements when tabIndex
is set.
VictoryVoronoiContainer
renders, including text
, style
, flyoutStyle
, width
and height
angle
prop on VictoryLabel
datum
rather than coordinate.Published by boygirl over 3 years ago
(2020-09-25)
preserveAspectRatio
prop to VictoryContainer
, and uses height: "100%"
rather than height: "auto"
, giving users finer control over how Victory's svgs are positioned and scaled within their containers.ouiaSafe
prop on VictoryContainer
VictoryContainer
. Thanks @dlabrecq!#1645 - Fix bug in text size approximation. Thanks @nburt!
#1631 - Correct types for TextSize
utility. Thanks @jlismore!
#1628 - Correct typescript error
This release introduces new label features and makes improvements to themes. This release includes breaking style changes. Please double check your label and tooltip styles when upgrading. Polar axes and pie charts may be particularly impacted.
VictoryLabel
now supports label backgrounds, which are rendered as rect
elements behind your labels. Backgrounds are styled via the new backgroundStyle
prop on VictoryLabel
. This prop may be given as a style object, or an array of objects for styling multi-line labels. Background elements are sized for their corresponding text elements, but padding may also be added with the backgroundPadding
prop, which accepts a single number, an object with values for "top", "bottom", "left" and "right", or an array of either of these for adding background padding to multi-line labels.
VictoryTooltip
has a new flyoutPadding
prop that may be used to add padding between the edge of the flyout and the label within it. The flyoutPadding
prop may be given as a single number of as an object with values for "top", "bottom", "left" and "right". This is a breaking change, as style.padding
no longer adds padding between the flyout and its label. Both of Victory's built-in themes have been altered so that tooltips get flyoutPadding={5}
by default.
VictoryPie
now supports the labelPlacement
prop used in polar charts. Possible values are "vertical" "parallel" and "perpendicular". When not given, vertical labels are rendered as before.
Themes now support polarAxis
, polarDependentAxis
, and polarIndependentAxis
namespaces that are merges with the less specific axis
, dependentAxis
, and independentAxis
themes as appropriate.
Changes Victory's default branch from master
to main
🖤
Textsize
approximations have changed, and are much more accurate in most cases. This may be a breaking change for layouts that depended on approximated text size
Tooltip themes are now correctly merged with label styles and props.
VictoryPolarAxis
elements are now rendered relative to the origin independently, rather than being translated as a group. This allows for correct positioning of elements within VictoryPortal
This may be a breaking change for custom components in VictoryPolarAxis
Corrects the labelPosition
prop on VictoryPie
(previously startAngle
and endAngle
were inverted) This is a breaking change
Alters material
and greyscale
themes. The following theme updates may cause breaking style changes
boxplot
and candlestick
polarDependentAxis
settings to the material
themetooltip
styles override label styles on all other theme namespaces. This means that tooltips pointers will now all start exactly at the data element they correspond to by default. To alter this behavior, either 1) provide a different theme, 2) alter padding in via label styles like so:
<VictoryBar
style={{ labels: { padding: 5 } }}
labelComponent={<VictoryTooltip />}
/>
or
<VictoryBar
labelComponent={
<VictoryTooltip style={{ padding: 5 }} />
}
/>