- 315 Infrastructure updates to support React 16
Breaking Change
-
312 Removes
orientDomain
method, as it will not be used with corresponding change forVictoryChart
. This change will be incompatible with versions ofvictory-chart
lower than24.0.0
-
310 Add
getPath
prop forPoint
to support custom path calculation -
311 Fix bug in
TextSize
-
313 Use
tickFormat
for calculating a stringMap when appropriate -
314 Theme changes: Change
pointerEvents
to "visible" for grids
- 307 Adds a default className for containers
- 306 Simplify container styling
BREAKING CHANGES: Containers are now rendered in parent divs. This may be a breaking change for parent styles.
- 299 Renders charts and portals in
div
elements to give z-index control to portals - 300 Fixes path rendering for decimal values
- 302 Adds an
alignment
prop for<Bar/>
so that bars may be rendered with "start", "middle" (default), or "end" alignment relative to their value. - 304
VictoryLabel
positioning is calculated fromdatum
whenx
andy
positioning props are not provided. This features supports data annotations - 305 Adds a
groupComponent
prop forVictoryPortal
. This prop is used byVictoryZoomContainer
so that children rendered withinVictoryPortal
may still be clipped when zooming
- 297 Adjusts automatic width in
VictoryLegend
- 296 Fixes layout bug in
VictoryLegend
BREAKING CHANGES: Styling and layout for VictoryTooltip
and VictoryLegend
are impacted
- 293 This may be a breaking change
Removes the default theme from
VictoryTooltip
. See PR for additional details. - 294 This may be a breaking change Improvements for
VictoryLegend
- Adds a legend border that can be styled or replaced with a custom component
- new props:
borderComponent={<Border/>}
andborderPadding
- new style / event namespace: "border"
- new props:
- Adds new primitive component
Border
which renders arect
element- props: common props +
width
,height
,x
andy
- props: common props +
- Adds a legend title with supporting props for positioning and centering titles
- new props: title, titleComponent={}, titleOrientation, centerTitle
- new style / event namespace: "title"
- Adds a legend border that can be styled or replaced with a custom component
- 295 Fixes deprecation error for React 16
- 290 Bugfix: VictoryPortal with VictoryZoomContainer
- 289 Bugfix: createContainer + containerId
- 288 Bugfix: containerId
- 287 Allow users to override
touchAction
style in containers
- 286 bugfix: tooltip positioning with
dx
anddy
-285 bugfix: tooltips with activateData
- 278 Support touch events
- 280 Fix tooltip rendering in VictoryPortal
- 281 bugfix: functional label padding
- 282 bugfix: fix "unknown props on
<g>
tag" warning - 283 Allow boolean value for animate prop
- 284 Sort arrays by "key" when animating. See #684
- 274 Fixes automatic bar width calculation for horizontal bars
- 275 Adds an optional
containerId
prop for all Victory containers - 276 Adds
downsample
method forData
- 267 Correct single-point domain logic
- 268 Correct stacked domain logic
- 269
VictoryLabel
accepts percentage values forx
andy
- 270
VictoryLegend
supports events - 272 Aggressive
shouldComponentUpdate
logic for evented Victory components *Breaking change for some components usingaddEvents
- 266 Support Webpack 3 and ES6 exports
- 265 Translates
Slice
when anorigin
prop is given
- 263 Removes commas prior to interpolating strings
- 262 Consistent widths for polar bars. This change may require style adjustments to maintain visual continuity
- 515 Bugfix for ARIA title and desc. Now both have unique IDs.
Minor bug fixes:
-254 Generalize label angle helper
-251 Adds an optional clipId
prop to VictoryClipContainer
-252 Changes domain calculation for single data point components so that domains aren't forced to include zero
-240 Polar Charts
Breaking Changes
- Removes default bar width from themes
- Changes how default bar widths are calculated
- Changes render methods for
Area
,Bar
andCurve
primitives (Breaking change forvictory-native
and others extending primitives) - Changes function sigintures for
Selection.getDomainCoordinates
andSelection.getDataCoordinates
(Breaking change forvictory-native
)
Features
- Adds a new
Arc
primitive which is used for polar axes and grid lines - Adds
polar
andorigin
props to rendered components (primitives,VictoryLabel
,VictoryClipContainer
VictoryContainer
) - Supports radial areas for
Area
andCurve
. These props have no effect for cartesian charts - Adds an
openPath
prop forCurve
. This prop is used to determine whether radial curves should be closed. Curves are closed by default, but when this prop is set to true they will not be. This prop has no effect for cartesian charts - Supports polar bars in the
Bar
primitive. (Angular bars only, radial bars are not yet supported) - Adds a
labelPlacement
prop toVictoryLabel
andVictoryTooltip
. Values are "parallel", "perpendicular", and "vertical". These flags help to appropriately position labels in polar charts. Polar charts will use "parallel" label placement by default. Cartesian charts will only use "'vertical" placement. - Adds support for circular clipPath
- Adds support for polar animation transitions for continuous chart types. During
onLoad
, all points grow from zero. DuringonEnter
andonExit
new points are added / removed at the location of an adjacent point to keep path interpolation as smooth as possible. This implementation obviates the need for radial clip-path animations for these chart types. before
andafter
callbacks foronLoad
,onEnter
andonExit
are now called withdatum
,index
, anddata
instead of onlydatum
.- Adds
LabelHelpers
- Adds helper methods for polar charts
-244 Passes missing datum
and index
props to Flyout
-246 Adds an itemsPerRow
prop to VictoryLegend
to support automatic legend wrapping
-249 Adds support for a y0 accessor so that users can have granular control over the baseline of components like VictoryArea
-250 Audits shouldComponentUpdate
logic for all primitive components so that changes to optional props like className
will cause components to re-render.
- 241 Adds optional
title
andesc
props toVictoryLabel
- 243 Impovements to
VictoryContainer
- Automatic
overflow: "visible"
for elements rendered inVictoryPortal
(tooltips) VictoryContainer
no longer rendersg
tags (this was causing confusion with evented containers)- Default responsive styles are now
width: "100%"
height: "100%"
(fixes a bug in safari) - Changes the merge order for responsive styles so that
width
andheight
attrs may be overridden
- Automatic
- 244 adds missing
index
anddatum
props toFlyout
- 245 fixes
dy
calculation inVictoryLabel
BREAKING CHANGE
- Updates to
react@^15.5.0
- Uses separate
prop-types
package - Projects using Victory must also depend on
prop-types
- Add
victory-native
support to getSVGEventCoordinates
- Remove default container theme
- Fix clipWidth bug
- Support
victory-native
upgrade
- Fixes a bug in
shouldComponentUpdate
logic inCandle
- Adds static roles for
VictoryContainer
,VictoryClipContainer
, andVictoryLabel
- Fixes a bug in
VictoryClipContainer
- Prevents unknown prop
clipWidth
on<g>
tags
- Fixes clipPath bugs
- FIxes VictoryLegend bugs
- Adds support for multi-repo tooling
- Rounds path values to prevent sub-pixel rendering
- Allows simple events directly on container components
- Support
VictoryClipContainer
for all x, y components
- Add
clipPadding
prop toVictoryClipContainer
to match the prop onClipPath
- Adds a
translateY
prop for clipPath to support x, y zoom behavior - Removes default clipPadding
- Adds a
theme
prop toVictoryContainer
so that custom containers may pick up themes from their parents - Removes default
title
anddesc
props fromVictoryContainer
- Adds support for providing
text
as an array forVictoryLabel
- Adds support for providing
style
as an array forVictoryLabel
so that each line of a multi-line label may be styled independently - Changes how null data values are handled by
Area
andCurve
primitives - Adds a
reduceChildren
method toHelpers
to ensure order consistency when working with nested children VictoryTooltip
no longer automatically adds theactive
prop to data when hovered. To turn this behavior on, set the newactivateData
boolean prop onVictoryTooltip
- Supports sorting data with a
sortKey
prop. - Styles gridlines with
pointerEvents: "none"
in all themes
-198
- Fixes a regression in
VictoryPortal
. Only top level containers should register and render portals
- 195
- Fixes null event state bug
- 193
- Removes the default
standalone: true
from VictoryContainer so that parents can set the value
- Removes the default
- 189 and 191
- Adds
VictoryLegend
component
- Adds
- 190
- Allows
VictoryContainer
to render either<g>
or<svg>
depending on the value of the standalone prop - Passes a timer down in context for
VictorySharedEvents
- Event handlers have access to the context they are being called from via an argument
- i.e.
onClick: (event, targetProps, eventKey, context) => {...}
- i.e.
- Enhances
addEvents
so that evented components can pick up "parentControllerProps" from parent state- useful for
VictoryZoomContainer
- useful for
- Adds the ability to define callbacks in the events prop that will be called after
setState
- useful for allowing
VictoryZoomContainer
to call methods likeresumeAnimation
- useful for allowing
- Allows
- 188
- Retains "x" and "y" in addition to "_x" and "_y" in formatted data. See PR for rationale and details.
- 187
- Fix a bug in voronoi themes
- Fix a bug in logic related to filtering data on selection.
- 183 Adds
shouldComponentUpdate
logic to all primitive components - 184 Fixes a bugs related to tooltip themes
- Fixes 471
- 185 Uses "_x" and "_y" instead of "x" and "y" for storing formatted data on data objects
- 186 Adds a custom interpolator for objects so that properties are correctly interpolated
- Fixes 460
- Fixes a bug in VictorySharedEvents
- Adds support for
active
boolean prop on all primitive components - Tooltips trigger
active
on both data and label components - Adds selection helpers to support
VictorySelectionContainer
- Changes when functional styles / props are evaluated
- they will now be evaluated from the primitive components so they can be evaluated with
active
- they will now be evaluated from the primitive components so they can be evaluated with
- Better support for
defaultEvents
on container components
- Add support for
className
on all primitive components
- Add
pointerEvents: "none"
to tooltip themes
- Fix bug related to duplicate keys in shared event children
- Change how continuous animations behave
- clipPath curtain will never be smaller than the range except onLoad
- Simplify transitions code
- Ensure that animations and transitions use the global timer passed in context or create their own
- Fix
bypassAnimation
bug - Ensure that clipPath width and height are never negative
- Change how data is generated for accessors to handle edge cases like FormidableLabs/victory#397
- Fix Transition domain bug
- Create timer only when needed
- Code style consistency
- Adds a global animation timer (non-breaking change)
- Stricter npmignore
- Uses
publishr
to reduce npm installed package size #413 - Fixes a bug where label padding was not being applied to tick labels #408
- Removes default tick padding in themes
- Changes how the domain is calculated when there is only one data point, or when the minimum and maximum of the data is equal in a given dimension #407
- Removes hard-codes
<g>
fromVictorySharedEvents
#402
- Fix aria role bug
- Allow npm 2 install
- Refactor rendered components for ease of native versions
- Fix bugs in exit transitions for continuous data components (line, area)
- Fix
dx
bug inVictoryLabel
Thanks to @gcedo
- Simplify cleanData so accessors are called only once
- removes support for
children
for VictoryLabel. Usetext
instead - upgrades all d3 packages
- renames
VictoryGroupContainer
->VictoryClipContainer
- refactors
VictoryClipContainer
for ease of native implementation - consistency of props for primitive components and VictoryLabel
- refactors ErrorBar primitive for clarity and ease of native implementation
- fixes a 0/falsey bug in transitions to allow for durations of 0 rather than falling back to defaults
- Fixes date related domain bugs
- Adds fallbacks to
formatData
so that data accessor props are optional
- Adds
VictoryPortal
which renders a single child in a top level portal container if it exists. Thanks to @nfcampos - Adds
VictoryGroupContainer
which renders children in a group container with aclipPath
if clipPath props exist - Removes
clipPath
properties fromCurve
andArea
primitives VictoryTransition
only passesclipPath
props to continuous children (i.e.VictoryLine
,VictoryArea
)- Adds an aggressive
shouldComponentUpdate
check toVictoryTransition
to prevent unnecessary rendering - Extracts event logic into a new inverted inheritance higher order component
addEvents
- Moves
Data
,Domain
, andScale
helpers fromvictory-chart
tovictory-core
- Minor changes in VictoryTooltip to support native version
- Fixes minor bugs related to tooltips
Breaking Changes for VictoryPie
themes
- This PR alters the label padding for
VictoryPie
in themes to work with the newlabelRadius
prop.
- Fix axis themes
- Adds
Flyout
andVoronoi
primitives - Adds
VictoryTooltip
a component withdefaultEvents
that renders a label within a flyout whenactive={true}
and renders nothing whenactive={false}
- Events now add
this.componentEvents
to the set of events for a component instance - Adds
getComponentEvents
helper toEvents
- Padding consistency and small stylistic changes in
VictoryTheme
- Fix
onEnd
animation callback
- Add
translateX
prop toClipPath
- Adds support for
onLoad
animations - Adds an
animating
state forVictoryTransition
so that the globalonEnd
callback is only called after all other transitions have finished - Fixes a bug in
onExit
clipPath transitions - Fixes a stylistic bug in the default
grayscale
theme #117 - Adds a
TextSize
utility for calculating the size of a text element without needing to render it. Thanks @nightwolfdu! - Exports all basic svg components from VictoryCore (i.e.
Bar
,Point
,Slice
etc.)
- VictoryLabel: minor changes to support
victory-core-native
- VictoryLabel: Adds a check for
fontSize
given as a string, and strips "px" when present
- Updates
builder-victory-component
to fix problems caused by missing lodash methods. Incomplete feature sets usinglodash-webpack-plugin
- Fixes a minor bug in VictoryTheme.material
- Fixes a minor bug for VictoryTransition
** This is a breaking change for themes **
- Alters the
VictoryTheme
API to match props. - Adds
VictoryTheme.grayscale
- Fixes a bug for clipPath animations with parentState
- Adds
displayName
to components for debugging - Adds array support for
childName
properties on event objects (attachment and mutation) - Enhances
onExit
andonExit
transitions with support for clipPath curtain effect
- Fix PropType warnings in React 15.3+
- Add animationInfo as 2nd argument to victory-animation child function call
- Remove
reduce-calc-css
dependency.
- Creates new getMinValue and getMaxValue array methods in order to maintain dates for domains.
- Adjusting the props passed to the text element of VictoryLabel to eliminate error messages
- Adding a new propType to validate numbers greater than zero
- Supports Victory Native
- Fixes a bug that prevented axis labels from displaying properly for vertical axes.
- Adds the modifyProps method, which merges component props with theme props and/or fallback props. Helps to further support theme implementation.
- Adds VictoryTheme, which allows users to import themes and custom themes into their VictoryChart and VictoryPie components
- Adds a minimalist grayscale theme compatible with all VictoryChart components and VictoryPie
- Fixes a bug related to event specificity
- Supports events on parent containers via the
parent
namespace in the event prop - Adds support for an "all"
eventKey
that will apply mutations to all elements of givenchildName
andtarget
.parent
events automatically target "all" unless aneventKey
is given. - Adds support for applying mutations to arrays of
eventKeys
i.e.[0, 2, 4]
- Associates parent events with child events via a
container
prop onVictorySharedEvents
. This is useful where shared events are implicit as inVictoryChart
andVictoryStack
-
Removes logic related to inverted chart types (i.e. horizontal bars) from the
getRange
method. This is a breaking change for horizontal bars -
Fixes a bug related to VictoryLabel transforms. Transforms provided via styles will now be applied instead of only transforms provided via the
transform
prop
- Adds VictoryContainer wrapper for all Victory components via the containerComponent prop. This is added by default unless the child component standalone prop is set to true. Helps add roles and optional titles/descriptions to make Victory charts more accessible to users using screen readers.
- Adds
VictorySharedEvents
wrapper for coordinating events between supported Victory Components. An annotated example of the new events API:
<VictorySharedEvents
events={[
{
childName: "firstBar", // if a child name is not provided, event will be attached to all children.
target: "data", // what type of element to attach to. Matches the style namespaces
eventKey: 1, // What event key of element to attach to. Defaults to the index in data.
eventHandlers: {
onClick: () => {
return {
childName: "secondBar", // the child to be modified
// props here are the props that define the targeted component i.e. what is passed to an individual bar
mutation: (props) => {
return {style: merge({}, props.style, {fill: "blue"})}; // Whatever is returned here will override the existing props
}
};
}
}
}, {
childName: "secondBar",
target: "data",
eventKey: 0,
eventHandlers: {
onClick: () => { // event handlers can return an array of mutation objects with different targeted elements
return [
{
childName: "firstBar",
mutation: (props) => {
return {style: merge({}, props.style, {fill: "cyan"})};
}
}, {
mutation: (props) => { // the default target element is whatever element the handler is attached to
return {style: merge({}, props.style, {fill: "orange"})};
}
}, {
target: "labels",
eventKey: 1,
mutation: () => {
return {text: "CLICKED"};
}
}
];
}
}
}
]}
>
<VictoryBar
name="firstBar" // if children don't have name props they can be referenced by index in shared events
style={{
data: {width: 25, fill: "gold"}
}}
data={[{x: "a", y: 2}, {x: "b", y: 3}, {x: "c", y: 4}]}
/>
<VictoryBar
name="secondBar"
data={[{x: "a", y: 2}, {x: "b", y: 3}, {x: "c", y: 4}]}
/>
</VictorySharedEvents>
- Upgrades to React 15
- Alters transitions to support wrapped components
- Uses
.js
file extension rather than.jsx
. - Updates import syntax for
lodash
- Changes how events are stored on state to facilitate interactions between elements
- This is a breaking change, as it will require the namespace to be returned with any other props from the event handler like so:
events: {
data: {
onClick: () => {
return { data: { style: {fill: "red"} }, labels: { style: {fill: "black"} } };
}
}
}
- Adds a VictoryTransition wrapper to facilitate enter and exit transitions for any components with an array
data
prop. - Supports coordinating transitions for deeply nested children (i.e. stacked bar charts)
- Modifies array interpolation so that the interpolated array is never longer than the end array. See d3/d3-interpolate#19
- Adds initial enter and exit transition support
- Adds a
labelAngle
prop to VictoryLabel - Improves transformations
- Upgrades to builder 2.9.1 for lodash 4 support
- Adds event helper methods
- Adds an events prop to VictoryLabel
- Updates to Babel 6
- Updates to Lodash 4
- Add matchDataLength custom proptype
- Merge
victory-label@1.0.1
,victory-util@5.0.0
,victory-animation@0.1.0
tovictory-core
- Don't publish source maps to npm or git
- Don't publish
docs/build
directory to npm - Add
npm start
andnpm test
scripts
- Add support for providing label text as a prop
- Retire
velocity
in favor ofduration
in milliseconds.
Below are the histories of individual subcomponents before they were merged into victory-core
.
- Update victory-util version
- Fix README title
- Use minified file path for gzip size badge
- Update
victory-util
for victory archetype bump. - Remove react peerDependency
Update victory-util
for data accessor feature bump
- Update builder and victory archetypes.
- Move lodash and radium dependencies from the archetype to the package
Refactor to use shared methods from victory-util
We make no promises about any code prior to this release.
- Remove chart specific methods, consolidate others
- Application dependencies like
lodash
now live in components, not in the Builder archetype. This is a breaking change. FormidableLabs/victory#176
- Supports data accessor functions! more detail
Data
Data.consolidateData(props)
->Data.formatDatasets(props)
Data.createAccessor(key)
PropTypes
integer
allOfType
- runs a given prop through an array of validators
This tag adds shared methods to VictoryUtil to reduce code repetition in all of the chart ecosystem components (VictoryChart, VictoryBar, VictoryAxis, VictoryLine, VictoryScatter)
Public methods added:
Scale
Scale.getBaseScale(props, axis)
Scale.getScaleType(props, axis)
Scale.getScaleFromProps(props, axis)
Scale.getScaleTypeFromData(props, axis)
This collection of methods:
- replaces the
getScale
methods that were used in the chart ecosystem repos - adds scale type checking via duck typing d3 scale methods
- adds support for passing in the scale type as a string i.e.
"linear"
instead ofd3Scale.linear()
Domain
Domain.getDomain(props, axis)
Domain.getDomainFromProps(props, axis)
Domain.getDomainFromData(dataset, axis)
Domain.padDomain(domain, props, axis)
This collection of methods:
- replaces the
getDomain
method in single data series components (VictoryScatter, VictoryLine) - Adds domain helpers for the more complicated components
Data
Data.getData(props)
Data.consolidateData(props)
Data.createStringMap(props, axis)
Data.getStringsFromCategories(props, axis)
Data.getStringsFromAxes(props, axis)
Data.getStringsFromData(props, axis)
Data.getStringsFromXY(props, axis)
This collection of methods:
- replaces the
getData
method in single data series components (VictoryScatter, VictoryLine) - replaces the
consolidateData
method in multi-series data components (VictoryBar) - replaces the
createStringMap
method for components - adds string helpers for creating a shared stringMap in VictoryChart
Chart
getPadding(props)
getRange(props, axis)
getStyles(props, defaultStyles)
evaluateProp(prop, data)
evaluateStyle(style, data)
This collection of methods:
- replaces
getRange
andgetPadding
methods across all chart ecosystem components - replaces
getStyle
method in components that take style objects in the following form
style={{
parent: {...},
data: {...},
labels: {...}
}}
- replaces functional style and functional prop support methods
evaluateProp
andevaluateStyle
across all chart components
We make no promises about any code prior to this release.