A collection of composable React components for building interactive data visualizations

Overview
victory

an ecosystem of composable React components for building interactive data visualizations.

weekly downloads current version build status Gzip size Maintenance Status

Victory

Contents

Getting started

  1. Add Victory to your project:
# npm
$ npm i --save victory
# or yarn
$ yarn add victory
  1. Add your first Victory component:
import React from "react";
import { render } from "react-dom";
import { VictoryPie } from "victory";

const PieChart = () => {
  return <VictoryPie />;
};

render(<PieChart />, document.getElementById("app"));
  1. VictoryPie component will be rendered, and you should see:

pie


Requirements

Projects using Victory should also depend on React. Victory works with React version 15 and above. As of [email protected] Victory requires React version 16.3.0 or above

Victory Native

Want to use Victory with React Native? Check out victory-native; Victory Native shares most of its code with Victory, and has a nearly identical API!

Contributing

Maintenance Status

Active: Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.

Comments
  • Fixed height, responsive width of VictoryChart

    Fixed height, responsive width of VictoryChart

    Hey there!

    I'm trying to create a chart which should have a fixed height of say 250px and fill 100% of the width of it's container. Kind of like a normal div would. Is that possible? I've looked through most of the documentation and couldn't find any pointers. (I imagine that ideally it should work via enabling vectorEffect: "non-scaling-stroke" as well.)

    Cheers and thank you for this great library! Daniel

    opened by danielberndt 31
  • Allow brush panning when mouse is dragged outside the container

    Allow brush panning when mouse is dragged outside the container

    Feature Requests

    Checklist

    • [x] I've read through the Docs and Guides to make sure this functionality doesn't already exist

    • [x] I've searched open issues to make sure I'm not opening a duplicate issue

    Description

    Dragging a brush and moving your cursor outside the container will stop the panning.

    Is it possible to somehow override this behaviour?

    This feature can be seen in both D3 and Dygraphs: https://bl.ocks.org/mbostock/6232620 http://dygraphs.com/gallery/#g/range-selector

    opened by sebastianquek 27
  • Implement victory-tooltip

    Implement victory-tooltip

    Requirements:

    • similar to label in that tooltips get positioned by their parents and are provided with data
    • should be positioned above other components (react-gateway? react-portal?)
    • should have some automatic events like hover
    • Integration into parents should be flexible i.e. should be able to pass custom tooltip components.
    Type: Enhancement :pencil2: 
    opened by coopy 27
  • builder and builder-victory component are runtime deps?

    builder and builder-victory component are runtime deps?

    These components seem to be related to building - which is a dev dep concern - and since builder-victory-component depends on chokidar/fsevents, it won't compile on our Linux machines.

    Do these things need to be runtime dependencies, or can they be devDependencies? Typically any building/compilation should be done at publish time, not at install time (postinstall scripts are deprecated).

    Status: Needs More Info :hand: 
    opened by ljharb 25
  • FastDeepEqual used in victory-core 21.1.5 causing RangeError: Maximum call stack size exceeded

    FastDeepEqual used in victory-core 21.1.5 causing RangeError: Maximum call stack size exceeded

    Bugs and Questions

    Checklist

    • [x] This is not a victory-native specific issue. (Issues that only appear in victory-native should be opened here)

    • [x] I have read through the FAQ and Guides before asking a question

    • [x] I am using the latest version of Victory

    • [x] I've searched open issues to make sure I'm not opening a duplicate issue

    The Problem

    I encountered this issue for a VictoryPie using a VictoryTooltip as its labelComponent. If no react component is supplied to the labelComponent prop, this error wont occur. It is caused by the FastDeepEqual package introduced in victory-core 21.1.5 because if I install victory-core 21.1.4, this issue wont occur.

    In this issue https://github.com/epoberezkin/fast-deep-equal/issues/8, it is indicated that this package is ignoring the possibility of a circular object being tested for equality. We all know react component are circular structure and this could cause a infinite loop of equality check.

    Strangely I only encounter this issue on my windows 10 PC while mac is working fine.

    opened by yizhoucao 20
  • Reduce (drastically) bundle size

    Reduce (drastically) bundle size

    Summary

    I really love this library, but the bundle size is to huge !!! Even I only want to use VictoryLine, I need to import the full victory, victory-chart and victory-core library + lodash.

    Here are some things to do in order to reduce bundle size, for victory, victory-chart and victory-core. I can do a PR for it

    • [ ] : Only import used lodash module

    Replace

    import { xxx, yyy } from "lodash";
    

    by

    import xxx from "lodash/xxx";
    import yyy from "lodash/yyy";
    
    
    • [ ] : Only import used victory-core module

    Replace

    import { PropTypes as CustomPropTypes, Helpers } from "victory-core";
    

    by

    import CustomPropTypes from "victory-core/lib/victory-util/prop-types";
    import Helpers from "victory-core/lib/victory-util/helpers";
    
    • [ ] : Add index.js when relevant

    For example, add an index.js file in victory-core/src/victory-transition so

    import VictoryTransition from "victory-core/lib/victory-transition/victory-transition";
    

    can by replaced by

    import VictoryTransition from "victory-core/lib/victory-transition";
    

    Details

    I'm trying victory with this sample

    import { VictoryLine } from 'victory-chart'
    <VictoryLine
      data={[
        {month: "September", profit: 35000, loss: 2000},
        {month: "October", profit: 42000, loss: 8000},
        {month: "November", profit: 55000, loss: 5000}
      ]}
      x="month"
      y={(datum) => datum.profit - datum.loss}
    />
    

    But the bundle is way to big !!! I used webpack-bundle-analyser to find why.

    Here is the graph I have with the current code

    screen shot 2017-04-02 at 14 18 49

    As you can see, even if I am only using VictoryLine, the full victory-core, victory-chart and lodash are included in my bundle

    So I tried to directly install victory-core and victory-chart and change my code sample to

    import VictoryLine from 'victory-chart/lib/components/victory-line/victory-line'
    ...
    

    Using this method I reduced the bundle size and only include VictoryLine from victory-chart in my bundle. Here is the new graph I get

    screen shot 2017-04-02 at 14 17 26

    Problem :

    • lodash is still fully included. You are using (line 1)
    import { partialRight, without } from "lodash";
    

    (which include the whole lodash library) but you only need

    import partialRight from "lodash/partialRight";
    import without from "lodash/without";
    
    • victory-core is still fully included. You are using (line 4-8)
    import {
      PropTypes as CustomPropTypes, Helpers, VictoryTransition, VictoryLabel, addEvents,
      VictoryContainer, VictoryTheme, DefaultTransitions, Curve, VictoryClipContainer,
      Data, Domain
    } from "victory-core";
    

    (which include the whole victory-core library) but you only need

    import LineHelpers from "./helper-methods";
    import CustomPropTypes from "victory-core/lib/victory-util/prop-types";
    import Helpers from "victory-core/lib/victory-util/helpers";
    import VictoryTransition from "victory-core/lib/victory-transition/victory-transition";
    import VictoryLabel from "victory-core/lib/victory-label/victory-label";
    import addEvents from "victory-core/lib/victory-util/add-events";
    import VictoryContainer from "victory-core/lib/victory-container/victory-container";
    import VictoryTheme from "victory-core/lib/victory-theme/victory-theme";
    import DefaultTransitions from "victory-core/lib/victory-util/default-transitions";
    import Curve from "victory-core/lib/victory-primitives/curve";
    import VictoryClipContainer from "victory-core/lib/victory-clip-container/victory-clip-container";
    import Data from "victory-core/lib/victory-util/data";
    import Domain from "victory-core/lib/victory-util/domain";
    
    opened by thomasthiebaud 20
  • x-axis tick label tilt

    x-axis tick label tilt

    I searched through the docs and could not find a property for letting the label tilt, just wondering am I missing something or it's not yet available. Because without tilt, the chart is a little bit terrifying. 2016-07-12 12 36 52

    opened by candy02058912 18
  • Performance issues?

    Performance issues?

    I was curious about how Victory would perform compared to vanilla D3, so I threw together a quick and dirty test. The code is here, and it attempts to make equivalent bar charts with each approach. You can switch the useVictory flag to specify which version is rendered.

    I also published each version for convenience. The D3 version performs noticeably better than the Victory version, so I am just curious if anyone knows why. The differences on mobile are even more pronounced.

    Again, this is simply a matter of curiosity. I don't mean to knock the project in any way.

    opened by bclinkinbeard 18
  • Support data accessor functions

    Support data accessor functions

    Requirements: Ability to pass in props to any component to specify how to get (x, y) data, which is either:

    • A string with (deep) property key; or
    • A function

    It would be great if this were implemented as a mixin/composable that could be imported from victory-util.

    Type: Enhancement :pencil2: 
    opened by coopy 18
  • Converting circular structure to JSON in victory-shared-events 34.3.9

    Converting circular structure to JSON in victory-shared-events 34.3.9

    Checklist

    • [X] This is not a victory-native specific issue. (Issues that only appear in victory-native should be opened here)

    • [X] I have read through the FAQ and Guides before asking a question

    • [X] I am using the latest version of Victory

    • [X] I've searched open issues to make sure I'm not opening a duplicate issue

    The Problem

    Running into the following error when rendering chart using the latest version of Victory. The error stack points to code introduced in this change: https://github.com/FormidableLabs/victory/pull/1592

    Uncaught TypeError: Converting circular structure to JSON
        --> starting at object with constructor 'SVGSVGElement'
        |     property '__reactInternalInstance$r1kbehfrxt8' -> object with constructor 'FiberNode'
        --- property 'stateNode' closes the circle
        at JSON.stringify (<anonymous>)
        at victory-shared-events.js:173
        at Array.reduce (<anonymous>)
        at alterChildren (victory-shared-events.js:158)
        at victory-shared-events.js:162
        at Array.reduce (<anonymous>)
        at alterChildren (victory-shared-events.js:158)
        at VictorySharedEvents.getNewChildren (victory-shared-events.js:202)
        at VictorySharedEvents.getContainer (victory-shared-events.js:209)
        at VictorySharedEvents.render (victory-shared-events.js:245)
        at finishClassComponent (react-dom.development.js:17160)
        at updateClassComponent (react-dom.development.js:17110)
        at beginWork (react-dom.development.js:18620)
        at HTMLUnknownElement.callCallback (react-dom.development.js:188)
        at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
        at invokeGuardedCallback (react-dom.development.js:292)
        at beginWork$1 (react-dom.development.js:23203)
        at performUnitOfWork (react-dom.development.js:22154)
        at workLoopSync (react-dom.development.js:22130)
        at performSyncWorkOnRoot (react-dom.development.js:21756)
        at react-dom.development.js:11089
        at unstable_runWithPriority (scheduler.development.js:653)
        at runWithPriority$1 (react-dom.development.js:11039)
        at flushSyncCallbackQueueImpl (react-dom.development.js:11084)
        at flushSyncCallbackQueue (react-dom.development.js:11072)
        at batchedEventUpdates$1 (react-dom.development.js:21877)
        at batchedEventUpdates (react-dom.development.js:795)
        at dispatchEventForLegacyPluginEventSystem (react-dom.development.js:3568)
        at attemptToDispatchEvent (react-dom.development.js:4267)
        at dispatchEvent (react-dom.development.js:4189)
        at unstable_runWithPriority (scheduler.development.js:653)
        at dispatchUserBlockingUpdate (react-dom.development.js:4172)
    
    Type: Bug :bug: 
    opened by gucolin 16
  • VictorySelectionContainer fires onSelectionCleared even if there was no selection

    VictorySelectionContainer fires onSelectionCleared even if there was no selection

    Bugs and Questions

    Checklist

    • [x] This is not a victory-native specific issue. (Issues that only appear in victory-native should be opened here)

    • [x] I have read through the FAQ and Guides before asking a question

    • [x] I am using the latest version of Victory

    • [x] I've searched open issues to make sure I'm not opening a duplicate issue

    The Problem

    VictorySelectionContainer fires onSelectionCleared whenever a chart is clicked, and absorbs the onClick event, so if a chart has both drag&drop selection and click-on-a-point type of single element selection, it doesn't work. So I think VictorySelectionContainer should check if a drag&drop selection is made previously, if not, should not absorb the onClick event.

    opened by ersinciftci 15
  • fix: fix using React.ComponentProps with VictoryLine component

    fix: fix using React.ComponentProps with VictoryLine component

    Looking at file myApp/node_modules/victory-line/lib/victory-line.d.ts file the built type file ended up with a constructor that takes props as type of any:

    declare class VictoryLineBase extends React.Component<VictoryLineProps> {
        constructor(props: any); // Breaks typing
        static animationWhitelist: string[];
    

    When trying to parse the components props one ended up with any type for VictoryLineProps. However inferring types for other components like VictoryScatter worked fine because it didn't have constructor defined in code.

    import {
      VictoryLine,
      VictoryScatter,
    } from "victory-native";
    
    type VictoryScatterProps = React.ComponentProps<typeof VictoryScatter>; // Correct typing
    type VictoryLineProps = React.ComponentProps<typeof VictoryLine>; // any type
    

    So in this PR just removing the constructor to avoid it getting any type. Doesn't look like the constructor is needed or used for anything anyway.

    opened by Waltari10 1
  • Negative stack not starting at given position

    Negative stack not starting at given position

    Describe the bug A clear and concise description of what the bug is.

    Victory version Which npm version are you using?

    Code Sandbox link Please include a code sandbox link or a similar reproduction if possible.

    To Reproduce Steps to reproduce the behavior:

    1. Go to '...'
    2. Click on '....'
    3. Scroll down to '....'
    4. See error

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem. (You can exclude this if you included a reproduction)

    Desktop (please complete the following information):

    • OS: [e.g. iOS]
    • Browser [e.g. chrome, safari]
    • Version [e.g. 22]

    Smartphone (please complete the following information):

    • Device: [e.g. iPhone6]
    • OS: [e.g. iOS8.1]
    • Browser [e.g. stock browser, safari]
    • Version [e.g. 22]

    Additional context Add any other context about the problem here.

    opened by sound-233 0
  • chore(deps): bump express from 4.17.1 to 4.18.2 in /docs

    chore(deps): bump express from 4.17.1 to 4.18.2 in /docs

    Bumps express from 4.17.1 to 4.18.2.

    Release notes

    Sourced from express's releases.

    4.18.2

    4.18.1

    • Fix hanging on large stack of sync routes

    4.18.0

    ... (truncated)

    Changelog

    Sourced from express's changelog.

    4.18.2 / 2022-10-08

    4.18.1 / 2022-04-29

    • Fix hanging on large stack of sync routes

    4.18.0 / 2022-04-25

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    Type: Dependencies :evergreen_tree: 
    opened by dependabot[bot] 1
  • Update PropTypes to support single axis scale values

    Update PropTypes to support single axis scale values

    Related issue #2489

    Users would get PropType errors on scale props when single axis values were provided (e.g. scale={{ x: 'log' }}) even though documentation and demos both have examples of single axis scale props and the components functioned normally.

    PropTypes for scale have been updated to no longer require both axises. PropTypes.shape was replaced with PropTypes.exact in order to catch invalid properties (e.g. { z: 'log' })

    Caveat

    TypeScript error is suppressed on updated prop types. The error appears when isRequired is removed from either axis properties. A verbose workaround could be to list each possible combination of axis properties to keep isRequired like so:

    scale: PropTypes.oneOfType([
      CustomPropTypes.scale,
      PropTypes.exact({
        x: CustomPropTypes.scale.isRequired,
        y: CustomPropTypes.scale.isRequired,
      }),
      PropTypes.exact({
        x: CustomPropTypes.scale.isRequired,
      }),
      PropTypes.exact({
        y: CustomPropTypes.scale.isRequired,
      }),
    ])
    
    opened by scottqmn 1
  • Fixed issue where VictoryChart would throw an unhandled exception whe…

    Fixed issue where VictoryChart would throw an unhandled exception whe…

    Fixed an issue (see #2391) where VictoryChart would throw an unhandled exception when passed null children.

    Note that this does currently ignore any non-element children passed into VictoryChart, which matches our documentation. I didn't see any use cases where we'd actually want to show something like a string or a number, but we can go with a less broad check if needed.

    opened by gwynethrose 1
Releases(v36.6.0)
  • v36.6.0(Aug 4, 2022)

    What's Changed

    • Various TypeScript improvements (#2335, #2363)
    • Migrated victory-axis to TypeScript (#2379)
    • Migrated victory-scatter to TypeScript (#2394)
    • Migrated victory-errorbar to TypeScript (#2395)
    • Migrated victory-box-plot to TypeScript (#2387)
    • Migrated victory-errorbar to TypeScript (#2395)
    • Migrated victory-brush-container and victory-brush-line to TypeScript (#2393)
    • Update source code with minor lint-based improvements (see #2236). (#2403)

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.5.3...v36.6.0

    Source code(tar.gz)
    Source code(zip)
  • v36.5.3(Jun 27, 2022)

    What's Changed

    • Export all types from Victory by @scottrippey in https://github.com/FormidableLabs/victory/pull/2333
    • Fix for #2329 (use-animation-state crashing charts) by @gksander in https://github.com/FormidableLabs/victory/pull/2334
    • Local VSC settings to ignore built files in search by @gksander in https://github.com/FormidableLabs/victory/pull/2332

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.5.2...v36.5.3

    Source code(tar.gz)
    Source code(zip)
  • v36.5.2(Jun 24, 2022)

    What's Changed

    • Remove dependency on use-context-selector by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2325

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.5.1...v36.5.2

    Source code(tar.gz)
    Source code(zip)
  • v36.5.1(Jun 23, 2022)

    What's Changed

    We are continuing our internal typescript migration, and making some changes to our test infrastructure and build pipeline. This work includes a couple typescript-related bug fixes.

    • TS migrate: core utils by @scottrippey in https://github.com/FormidableLabs/victory/pull/2289
    • Typescript: added types to victory-vendor by @scottrippey in https://github.com/FormidableLabs/victory/pull/2292
    • TypeScript migration: more utils! by @scottrippey in https://github.com/FormidableLabs/victory/pull/2299
    • TS migrate: prop types by @scottrippey in https://github.com/FormidableLabs/victory/pull/2300
    • Modularize calculated props helpers by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2290
    • Build enhancements for move tests PR by @ryan-roemer in https://github.com/FormidableLabs/victory/pull/2305
    • Chore: generate source maps by @scottrippey in https://github.com/FormidableLabs/victory/pull/2307
    • TypeScript: Mark data as readonly by @scottrippey in https://github.com/FormidableLabs/victory/pull/2313
    • TS migrate: add events by @scottrippey in https://github.com/FormidableLabs/victory/pull/2306
    • Move tests to root directories by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2301
    • Update prettier trailing comma rule by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2315
    • TS: migrate victory-area, victory-chart by @scottrippey in https://github.com/FormidableLabs/victory/pull/2314
    • TypeScript: migrate victory to TypeScript by @scottrippey in https://github.com/FormidableLabs/victory/pull/2319
    • Use build config for babel by @ryan-roemer in https://github.com/FormidableLabs/victory/pull/2321
    • Add Victory Bar v37 by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2316

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.5.0...v36.5.1

    Source code(tar.gz)
    Source code(zip)
  • v36.5.0(Jun 7, 2022)

    What's Changed

    In 36.5.0 we pushed a lot of changes to our internal tooling. We replaced mocha and enzyme tests with Jest and React Testing Library, migrated some core parts of our codebase to Typescript, and bumped our React version to React 18. 🎉

    • victory-histogram jest tests by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2255
    • Convert tests for victory error bar by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2266
    • Typescript Phase 1: Build configuration by @scottrippey in https://github.com/FormidableLabs/victory/pull/2260
    • victory-vendor: script cleanup and exports enhancements by @ryan-roemer in https://github.com/FormidableLabs/victory/pull/2264
    • victory-pie jest/rtl tests by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2268
    • Typescript: Generate proper .d.ts files for Core by @scottrippey in https://github.com/FormidableLabs/victory/pull/2271
    • Disable func-style eslint rule by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2275
    • Add victory-scatter tests by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2269
    • TS migration: victory-primitives by @scottrippey in https://github.com/FormidableLabs/victory/pull/2274
    • Enable eslint-comments by @scottrippey in https://github.com/FormidableLabs/victory/pull/2277
    • Remove karma tests by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2279
    • ts-migration: migrated core components to TS by @scottrippey in https://github.com/FormidableLabs/victory/pull/2278
    • Upgrade React to v18 by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2280
    • ts-migration: more core by @scottrippey in https://github.com/FormidableLabs/victory/pull/2284
    • TypeScript: fix a few build issues by @scottrippey in https://github.com/FormidableLabs/victory/pull/2285
    • [Demo]: Upgrade React Native demo app by @jpdriver in https://github.com/FormidableLabs/victory/pull/2288

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.4.1...v36.5.0

    Source code(tar.gz)
    Source code(zip)
  • v36.4.1(May 25, 2022)

    What's Changed

    This release includes mostly testing improvements, with one bugfix for prop types by @gustaff-weldon.

    • Dev: Switch to ye olde yarn1 by @ryan-roemer in https://github.com/FormidableLabs/victory/pull/2228
    • [docs]: update victory-native introduction by @jpdriver in https://github.com/FormidableLabs/victory/pull/2231
    • brush container helper jest tests by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2229
    • Infra: Node updates by @ryan-roemer in https://github.com/FormidableLabs/victory/pull/2235
    • Docs: Upgrade to latest [email protected] by @ryan-roemer in https://github.com/FormidableLabs/victory/pull/2234
    • Upgrade dependencies by @ryan-roemer in https://github.com/FormidableLabs/victory/pull/2238
    • Added helpful error message to 'test' script by @scottrippey in https://github.com/FormidableLabs/victory/pull/2248
    • Convert victory and victory-chart tests to jest by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2246
    • Feature/jest candlestick tests by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2247
    • Add victory core tests by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2249
    • Add tests for victory-stack, victory-group, and victory-selection-container by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2253
    • Test migration: victory-tooltip, victory-voronoi by @scottrippey in https://github.com/FormidableLabs/victory/pull/2252
    • [FIX] Replace references to non-existent PropTypes.function with PropTypes.func by @gustaff-weldon in https://github.com/FormidableLabs/victory/pull/2257
    • Fix duplicate user props by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2256
    • migrate existing legend tests to jest by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2259

    New Contributors

    • @scottrippey made their first contribution in https://github.com/FormidableLabs/victory/pull/2248
    • @gustaff-weldon made their first contribution in https://github.com/FormidableLabs/victory/pull/2257

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.4.0...v36.4.1

    Source code(tar.gz)
    Source code(zip)
  • v36.4.0(May 10, 2022)

    What's Changed

    • Added the ability to add victory charts title and desc props for better accessibility by @shankstee in https://github.com/FormidableLabs/victory/pull/2199
    • Bump axios from 0.19.2 to 0.21.2 in /docs by @dependabot in https://github.com/FormidableLabs/victory/pull/2188
    • Bump cross-fetch from 3.1.4 to 3.1.5 by @dependabot in https://github.com/FormidableLabs/victory/pull/2206
    • add style interface to SliceProps type by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2212
    • Add jest and react testing library tests for victory-line and victory-area by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2196
    • fix typos in scale prop documentation by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2218
    • Bump cross-fetch from 3.1.4 to 3.1.5 by @dependabot in https://github.com/FormidableLabs/victory/pull/2213
    • Bump cross-fetch from 3.1.4 to 3.1.5 in /demo/rn by @dependabot in https://github.com/FormidableLabs/victory/pull/2207
    • add box plot jest/rtl tests by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2225
    • jest and rtl unit tests for bar components by @heythisispaul in https://github.com/FormidableLabs/victory/pull/2216
    • Add victory-vendor package for d3 dependencies by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2204

    Introducing the victory-vendor package

    In order to safely upgrade d3-packages while still allowing Node.js users to use ESM imports, we introduced a new package called victory-vendor for babelifying our d3 packages to make them more compatible with Victory. For more info, check out the description here.

    This should not make much of a difference for the end user, but there are a couple changes to be aware of. Upgrading d3-scale introduced some minor scaling changes. If you (like us) are using Chromatic or another visual regression testing tool, it may pick up some very small differences in the placement of axes and data points. d3-scale also introduced some changes to the scale.tickFormat function that changes the default formatting for log scales.

    | Before | After | |---|---| |Screen Shot 2022-05-10 at 2 23 55 PM|Screen Shot 2022-05-10 at 2 24 03 PM|

    If you are using a log scale and don't wish to use d3's default label formatting, You can use the tickFormat prop on a VictoryAxis component to override this default formatting. https://formidable.com/open-source/victory/docs/victory-axis#tickformat

    New Contributors

    • @shankstee made their first contribution in https://github.com/FormidableLabs/victory/pull/2199
    • @heythisispaul made their first contribution in https://github.com/FormidableLabs/victory/pull/2212

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.3.2...v36.4.0

    Source code(tar.gz)
    Source code(zip)
  • v36.3.2(Apr 14, 2022)

    What's Changed

    • Added functionality to be able to pass user props to components. Safe… by @dlcartright in https://github.com/FormidableLabs/victory/pull/2151
    • Bump moment from 2.29.1 to 2.29.2 by @dependabot in https://github.com/FormidableLabs/victory/pull/2186
    • Add user props tests and remove arbitrary demo props by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2172
    • Bump minimist from 1.2.5 to 1.2.6 in /demo/rn by @dependabot in https://github.com/FormidableLabs/victory/pull/2177
    • Add safe user props to all top-level components by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2191
    • Bump ansi-regex from 3.0.0 to 3.0.1 in /demo/rn by @dependabot in https://github.com/FormidableLabs/victory/pull/2190
    • Bump plist from 3.0.4 to 3.0.5 in /demo/rn by @dependabot in https://github.com/FormidableLabs/victory/pull/2189
    • Bump async from 2.6.3 to 2.6.4 in /demo/rn by @dependabot in https://github.com/FormidableLabs/victory/pull/2193
    • Allow additional props from user, such as aria-label and data-testid by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2192
    • Fix Horizontal charts panning at the incorrect rate by @TabithaMaudMM in https://github.com/FormidableLabs/victory/pull/2179

    New Contributors

    • @dlcartright made their first contribution in https://github.com/FormidableLabs/victory/pull/2151
    • @TabithaMaudMM made their first contribution in https://github.com/FormidableLabs/victory/pull/2179

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.3.1...v36.3.2

    Source code(tar.gz)
    Source code(zip)
  • v36.3.1(Mar 14, 2022)

    What's Changed

    • add FAQ for Expo Web apps by @jpdriver in https://github.com/FormidableLabs/victory/pull/2121
    • Add RegExp array to voronoiBlacklist type by @brendanmorrell in https://github.com/FormidableLabs/victory/pull/2127
    • Bump url-parse from 1.5.3 to 1.5.10 by @dependabot in https://github.com/FormidableLabs/victory/pull/2143
    • Bump url-parse from 1.5.3 to 1.5.10 in /demo/rn by @dependabot in https://github.com/FormidableLabs/victory/pull/2144
    • Bump node-fetch from 2.6.0 to 2.6.7 in /docs by @dependabot in https://github.com/FormidableLabs/victory/pull/2075
    • Fix TS build 2094 by @matt-hernandez in https://github.com/FormidableLabs/victory/pull/2107
    • Bump karma from 6.3.14 to 6.3.16 by @dependabot in https://github.com/FormidableLabs/victory/pull/2148
    • Bump url-parse from 1.4.7 to 1.5.10 in /docs by @dependabot in https://github.com/FormidableLabs/victory/pull/2147
    • Bump postcss from 7.0.32 to 7.0.39 in /docs by @dependabot in https://github.com/FormidableLabs/victory/pull/2146
    • Bump prismjs from 1.20.0 to 1.27.0 in /docs by @dependabot in https://github.com/FormidableLabs/victory/pull/2145
    • Bump lodash from 4.17.19 to 4.17.21 in /docs by @dependabot in https://github.com/FormidableLabs/victory/pull/2159

    New Contributors

    • @jpdriver made their first contribution in https://github.com/FormidableLabs/victory/pull/2121
    • @brendanmorrell made their first contribution in https://github.com/FormidableLabs/victory/pull/2127
    • @matt-hernandez made their first contribution in https://github.com/FormidableLabs/victory/pull/2107

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.3.0...v36.3.1

    Source code(tar.gz)
    Source code(zip)
  • v36.3.0(Feb 14, 2022)

    What's Changed

    • Bump follow-redirects from 1.14.7 to 1.14.8 by @dependabot in https://github.com/FormidableLabs/victory/pull/2095
    • Bump karma from 6.3.4 to 6.3.14 by @dependabot in https://github.com/FormidableLabs/victory/pull/2092
    • Fix font stack and correct margins in docs by @melvin-chen in https://github.com/FormidableLabs/victory/pull/2070
    • Patch missing text component type by @youPickItUp in https://github.com/FormidableLabs/victory/pull/2089
    • Bump nanoid from 3.1.28 to 3.2.0 in /demo/rn by @dependabot in https://github.com/FormidableLabs/victory/pull/2074
    • Patch missing text component type by @becca-bailey in https://github.com/FormidableLabs/victory/pull/2097
    • fix: android touch events by @zibs in https://github.com/FormidableLabs/victory/pull/2071
    • feat: Add VictoryNativeBrushLine component by @zibs in https://github.com/FormidableLabs/victory/pull/2077

    New Contributors

    • @melvin-chen made their first contribution in https://github.com/FormidableLabs/victory/pull/2070
    • @youPickItUp made their first contribution in https://github.com/FormidableLabs/victory/pull/2089
    • @zibs made their first contribution in https://github.com/FormidableLabs/victory/pull/2071

    Full Changelog: https://github.com/FormidableLabs/victory/compare/v36.2.2...v36.3.0

    Source code(tar.gz)
    Source code(zip)
  • v35.9.0(Jun 24, 2021)

    (2021-06-24)

    Adds a new disableInlineStyles prop to components and primitives to support users who want to style their components by class, or use a CSS in JS solution like styled-components

    When the new disableInlineStyles prop is supplied to a component like VictoryBar no styles will be supplied to either data or label components that it renders:

    const StyledBar = styled(Bar)`
      fill: purple;
    `
    const StyledLabel = styled(VictoryLabel)`
      tspan {
        fill: magenta;
        font-family: Papyrus, fantasy;
      }
    `
    function CustomStyledBarChart() {
      return (
        <VictoryChart>
          <VictoryBar
            disableInlineStyles
            labels={[1, 2, 3, 4]}
            dataComponent={<StyledBar />}
            labelComponent={<StyledLabel />}
          />
        </VictoryChart>
      )
    }
    

    The disableInlineStyles prop may also be supplied to primitive components for more granular control:

    const StyledBar = styled(Bar)`
      fill: purple;
    `
    function CustomStyledBarChart() {
      return (
        <VictoryChart>
          <VictoryBar
            labels={[1, 2, 3, 4]}
            dataComponent={<StyledBar disableInlineStyles />}
          />
        </VictoryChart>
      )
    }
    

    Related PRs

    • #1882 - Thanks @beccanelson!
    • #1856 - Thanks @tvsmk!
    Source code(tar.gz)
    Source code(zip)
  • v35.8.6(Jun 22, 2021)

  • v35.8.5(Jun 22, 2021)

  • v35.8.4(Jun 22, 2021)

  • v35.8.3(Jun 22, 2021)

  • v35.8.2(Jun 22, 2021)

  • v35.8.1(Jun 22, 2021)

  • v35.8.0(Jun 22, 2021)

    (2021-05-19)

    • #1858 - domainPadding updates

    updates how domainPadding is applied to charts when 1) the additional padding would not result new quadradants being added, or 2) the user has set singleQuadrantDomainPadding={false}. In these cases, domainPadding is applied by calculating a new, smaller range that takes the desired, pixel-based padding into account, and then adding domain padding such that the previous domain fits entirely within the new, smaller range. In most cases, this change will make it much easier to do things like create bar charts where the first bar starts cleanly at the edge of the chart, by setting domainPadding={{ x: myBarWidth / 2 }} This may cause visual changes for charts that use very large values for domainPadding. The domainPadding prop may need to be adjusted

    calculates a more exact defaultDomainPadding for grouped bar charts based on the offset, number of bars, and the width of each bar (either from the barWidth prop or from a default barWidth based on the number of bars and the range). Previously, defaultDomainPadding was approximated based only on offset and number of bars.

    Source code(tar.gz)
    Source code(zip)
  • v35.7.2(Jun 22, 2021)

  • v35.7.1(Jun 22, 2021)

  • v35.7.0(Jun 22, 2021)

    (2021-05-12)

    • #1835 - This PR makes VictoryAxis responsible for calculating its own default xOffset, yOffset, orientation, and crossAxis values rather than relying on VictoryChart to determine these values. This change corrects several bugs related to how axes update on charts that use VictoryZoomContainer. We don't anticipate breaking changes with this update, but axis positioning will update differently (more correctly) when zooming. Thanks @jhumbug!
    Source code(tar.gz)
    Source code(zip)
  • v35.6.4(Jun 22, 2021)

  • v35.6.3(Jun 22, 2021)

  • v35.6.2(Jun 22, 2021)

  • v35.6.1(Jun 22, 2021)

  • v35.6.0(Jun 22, 2021)

    (2021-05-04)

    • #1827 - Points fully outside of a chart domain are now given null values to prevent them from being rendered. Exceptions are made for continuous chart types like VictoryArea and VictoryLine. This PR also includes a fix for animations so that animating data always reaches its final state before a new animation begins. Thanks @jhumbug!
    Source code(tar.gz)
    Source code(zip)
  • v35.5.1(Jun 22, 2021)

  • v35.5.0(Jun 22, 2021)

    (2021-04-07)

    • #1815 - Fix a bug affecting VictoryBrushContainer with allowResize set to false, and use defaultBrushArea="move" by default when allowResize is set to false.
    Source code(tar.gz)
    Source code(zip)
  • v35.4.13(Jun 22, 2021)

  • v35.4.12(Jun 22, 2021)

Owner
Formidable
We design and develop web apps, train engineers at startups and Fortune 500 companies, and improve the modern web with open source software.
Formidable
🧱 Easily extend native three.js materials with modular and composable shader units and effects

three-extended-material Easily extend native three.js materials with modular and composable shader units and effects. Usage npm install three-extended

Leonardo Cavaletti 26 Dec 2, 2022
A React utility belt for function components and higher-order components.

A Note from the Author (acdlite, Oct 25 2018): Hi! I created Recompose about three years ago. About a year after that, I joined the React team. Today,

Andrew Clark 14.8k Jan 4, 2023
The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.

Module SonarCloud Status ag-grid-community ag-grid-enterprise AG Grid AG Grid is a fully-featured and highly customizable JavaScript data grid. It del

AG Grid 9.5k Dec 30, 2022
Finished code and notes from EFA bonus class on building a React project without create-react-app

React From Scratch Completed Code This is the completed code for the EFA bonus class on building a React project from scratch. Included are also markd

Conor Broaders 3 Oct 11, 2021
React-app - Building volume rendering web app with VTK.js,react & HTML Using datasets provided in vtk examples (head for surface rendering and chest for ray casting)

SBE306 Assignment 4 (VTK) data : Directory containing Head and Ankle datasets Description A 3D medical viewer built with vtk-js Team Team Name : team-

Mustafa Megahed  2 Jul 19, 2022
React components for efficiently rendering large lists and tabular data

React components for efficiently rendering large lists and tabular data. Check out the demo for some examples. Sponsors The following wonderful compan

Brian Vaughn 24.5k Jan 7, 2023
React components for efficiently rendering large lists and tabular data

react-window React components for efficiently rendering large lists and tabular data React window works by only rendering part of a large data set (ju

Brian Vaughn 13.5k Jan 4, 2023
React components and hooks for creating VR/AR applications with @react-three/fiber

@react-three/xr React components and hooks for creating VR/AR applications with @react-three/fiber npm install @react-three/xr These demos are real,

Poimandres 1.4k Jan 4, 2023
A react component available on npm to easily link to your project on github and is made using React, TypeScript and styled-components.

fork-me-corner fork-me-corner is a react component available on npm to easily link to your project on github and is made using React, TypeScript and s

Victor Dantas 9 Jun 30, 2022
we are make our components in story book. So if we add some components you can find document and example of useage in storybook.

we are make our components in story book. So if we add some components you can find document and example of useage in storybook.

고스락 6 Aug 12, 2022
Providing accessible components with Web Components & Material You

tiny-material Still on developing, DO NOT use for production environment Run well on Google Chrome, Firefox, Chrome for Android, Microsoft Edge (Chrom

HugePancake 11 Dec 31, 2022
🌈 React for interactive command-line apps

React for CLIs. Build and test your CLI output using components. Ink provides the same component-based UI building experience that React offers in the

Vadim Demedes 19.7k Jan 3, 2023
An interactive CLI automation tool 🛠️ for creating react.js and next.js projects most fast and efficiently. ⚛️

An interactive CLI automation tool ??️ for creating react.js and next.js projects most fast and efficiently. ⚛️ About ℹ️ ReexJs CLI is an interactive

Alexis Guzman 27 Apr 12, 2022
Edvora App is a web application based on an external API, showing data about different types of products and the user can filter these data by choosing a specific state, city or product name. Build with React.js

Edvora App is a web application based on an external API, showing data about different types of products and the user can filter these data by choosing a specific state, city or product name. Build with React.js

Kyrillos Hany 5 Mar 11, 2022
A collection of sample apps built using GetStream and React Native

React Native samples [ Built with ♥ at Stream ] This repo contains projects and samples developed by the team and Stream community, using React Native

Stream 93 Jan 8, 2023
Collection of Animated 60 FPS TabBar Component's based on React Navigation.

React Navigation TabBar Collection Collection of Animated 60 FPS TabBar Components based on React Navigation. Features 60 FPS Animation Beautiful TabB

Mikalyh 22 Dec 9, 2022
A frontend Framework for building B2B applications running in the browser on top of REST/GraphQL APIs, using ES6, React and Material Design

react-admin A frontend Framework for building data-driven applications running in the browser on top of REST/GraphQL APIs, using ES6, React and Materi

marmelab 21.2k Dec 30, 2022
⚛️ Hooks for building fast and extendable tables and datagrids for React

Hooks for building lightweight, fast and extendable datagrids for React Enjoy this library? Try them all! React Query, React Form, React Charts Visit

Tanner Linsley 20.3k Jan 3, 2023
The repository helps you learn React by building Netflix :star:

Learn React by Building Netflix. Click ⭐ if you like the project. Pull Request are highly appreciated ❤️ You can check the advance folder for more Rea

Hiep Le 181 Dec 22, 2022