victory 31.0.1 → 31.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,27 +4,25 @@
4
4
 
5
5
  1. Add Victory to your project:
6
6
 
7
- ```sh
8
- $ npm install victory --save
9
- ```
7
+ ```sh
8
+ $ npm install victory --save
9
+ ```
10
10
 
11
11
  2. Add your first Victory component:
12
12
 
13
- ```js
14
- import React, { Component } from 'react';
15
- import { render } from 'react-dom';
16
- import { VictoryPie } from 'victory';
17
-
18
- class PieChart extends Component {
19
- render() {
20
- return (
21
- <VictoryPie />
22
- );
23
- }
13
+ ```js
14
+ import React, { Component } from "react";
15
+ import { render } from "react-dom";
16
+ import { VictoryPie } from "victory";
17
+
18
+ class PieChart extends Component {
19
+ render() {
20
+ return <VictoryPie />;
24
21
  }
22
+ }
25
23
 
26
- render(<PieChart />, document.getElementById('app'));
27
- ```
24
+ render(<PieChart />, document.getElementById("app"));
25
+ ```
28
26
 
29
27
  3. `VictoryPie` component will be rendered, and you should see:
30
28
 
@@ -33,16 +31,18 @@
33
31
  </p>
34
32
 
35
33
  ## Requirements
34
+
36
35
  Projects using Victory should also depend on [React][] and [prop-types][].
37
36
 
38
37
  ## Victory Native
38
+
39
39
  Want to use `Victory` with React Native? Check out [victory-native](https://github.com/FormidableLabs/victory-native)
40
40
  Victory Native shares most of its code with Victory, and has a nearly identical api!
41
41
 
42
42
  ## [Contributing](CONTRIBUTING.md)
43
43
 
44
-
45
44
  ## Issues
45
+
46
46
  ### Jest Snapshots
47
47
 
48
48
  If you want to use [Jest snapshot testing](https://github.com/storybooks/storybook/tree/master/addons/storyshots)
@@ -51,13 +51,12 @@ being used for a `VictoryClipContainer` group component.
51
51
  The solution to this is to set a static `clipId` on your `VictoryClipContainer`.
52
52
 
53
53
  For example, when creating a `VictoryLine` component, you can pass a `groupComponent` prop:
54
+
54
55
  ```js
55
- <VictoryLine
56
- groupComponent={<VictoryClipContainer clipId={1} />}
57
- />
56
+ <VictoryLine groupComponent={<VictoryClipContainer clipId={1} />} />
58
57
  ```
59
58
 
60
59
  Now the `clipId` attached to your `VictoryLine` component will always be the same, and your snapshot will not change with each test run.
61
60
 
62
- [React]: https://facebook.github.io/react/
61
+ [react]: https://facebook.github.io/react/
63
62
  [prop-types]: https://github.com/reactjs/prop-types