Skip to content

Commit f618ba3

Browse files
author
Chris Williams
committed
prettier(root): run on *.md
1 parent e8fc435 commit f618ba3

File tree

3 files changed

+133
-66
lines changed

3 files changed

+133
-66
lines changed

CODE_OF_CONDUCT.md

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,64 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers
6+
pledge to making participation in our project and our community a harassment-free experience for
7+
everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level
8+
of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
69

710
## Our Standards
811

912
Examples of behavior that contributes to creating a positive environment include:
1013

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
14+
- Using welcoming and inclusive language
15+
- Being respectful of differing viewpoints and experiences
16+
- Gracefully accepting constructive criticism
17+
- Focusing on what is best for the community
18+
- Showing empathy towards other community members
1619

1720
Examples of unacceptable behavior by participants include:
1821

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
22+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
23+
- Trolling, insulting/derogatory comments, and personal or political attacks
24+
- Public or private harassment
25+
- Publishing others' private information, such as a physical or electronic address, without explicit
26+
permission
27+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2428

2529
## Our Responsibilities
2630

27-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
31+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are
32+
expected to take appropriate and fair corrective action in response to any instances of unacceptable
33+
behavior.
2834

29-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
35+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
36+
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or
37+
to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate,
38+
threatening, offensive, or harmful.
3039

3140
## Scope
3241

33-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
42+
This Code of Conduct applies both within project spaces and in public spaces when an individual is
43+
representing the project or its community. Examples of representing a project or community include
44+
using an official project e-mail address, posting via an official social media account, or acting as
45+
an appointed representative at an online or offline event. Representation of a project may be
46+
further defined and clarified by project maintainers.
3447

3548
## Enforcement
3649

37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
50+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting
51+
the project team at [email protected]. The project team will review and investigate all complaints, and
52+
will respond in a way that it deems appropriate to the circumstances. The project team is obligated
53+
to maintain confidentiality with regard to the reporter of an incident. Further details of specific
54+
enforcement policies may be posted separately.
3855

39-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
56+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face
57+
temporary or permanent repercussions as determined by other members of the project's leadership.
4058

4159
## Attribution
4260

43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
61+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
62+
[http://contributor-covenant.org/version/1/4][version]
4463

4564
[homepage]: http://contributor-covenant.org
4665
[version]: http://contributor-covenant.org/version/1/4/

PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#### :boom: Breaking Changes
22

3-
-
3+
-
44

55
#### :rocket: Enhancements
66

@@ -12,7 +12,7 @@
1212

1313
#### :bug: Bug Fix
1414

15-
-
15+
-
1616

1717
#### :house: Internal
1818

README.md

Lines changed: 95 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
### vx
2929

30-
vx is a collection of reusable low-level visualization components. vx combines the power of d3 to generate your visualization with the benefits of react for updating the DOM.
30+
vx is a collection of reusable low-level visualization components. vx combines the power of d3 to
31+
generate your visualization with the benefits of react for updating the DOM.
3132

3233
<br />
3334

@@ -57,14 +58,12 @@ vx is a collection of reusable low-level visualization components. vx combines t
5758
</strong>
5859
</p>
5960

60-
6161
<p align="center">
6262
<a href="https://vx-demo.now.sh/gallery">
6363
<img src="./assets/vx-gallery.png" />
6464
</a>
6565
</p>
6666

67-
6867
## Usage
6968

7069
[![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/remix/kind-modem)
@@ -114,9 +113,15 @@ const yScale = scaleLinear({
114113
});
115114

116115
// Compose together the scale and accessor functions to get point functions
117-
const compose = (scale, accessor) => (data) => scale(accessor(data));
118-
const xPoint = compose(xScale, x);
119-
const yPoint = compose(yScale, y);
116+
const compose = (scale, accessor) => data => scale(accessor(data));
117+
const xPoint = compose(
118+
xScale,
119+
x,
120+
);
121+
const yPoint = compose(
122+
yScale,
123+
y,
124+
);
120125

121126
// Finally we'll embed it all in an SVG
122127
function BarGraph(props) {
@@ -131,7 +136,7 @@ function BarGraph(props) {
131136
y={yMax - barHeight}
132137
height={barHeight}
133138
width={xScale.bandwidth()}
134-
fill='#fc2e1c'
139+
fill="#fc2e1c"
135140
/>
136141
</Group>
137142
);
@@ -150,86 +155,124 @@ For more examples using `vx`, check out the [gallery](https://vx-demo.now.sh/gal
150155

151156
**Goal**
152157

153-
The goal is to create a library of components you can use to make both your own reusable chart library or your slick custom one-off chart. vx is largely unopinionated and is meant to be build on top of. Keep your bundle sizes down and use only the packages you need.
158+
The goal is to create a library of components you can use to make both your own reusable chart
159+
library or your slick custom one-off chart. vx is largely unopinionated and is meant to be build on
160+
top of. Keep your bundle sizes down and use only the packages you need.
154161

155162
**How?**
156163

157-
Under the hood, vx is using d3 for the calculations and math. If you're creating your own awesome chart library on top of vx, it's easy to create a component api that hides d3 entirely. Meaning your team could create charts as easily as using reusable react components.
164+
Under the hood, vx is using d3 for the calculations and math. If you're creating your own awesome
165+
chart library on top of vx, it's easy to create a component api that hides d3 entirely. Meaning your
166+
team could create charts as easily as using reusable react components.
158167

159168
**But why?**
160169

161-
Mixing two mental models for updating the DOM is never a good time. Copy and pasting d3 code into `componentDidMount()` is just that. This collection of components lets you easily build your own reusable visualization charts or library without having to learn d3. No more selections or `enter()`/`exit()`/`update()`.
170+
Mixing two mental models for updating the DOM is never a good time. Copy and pasting d3 code into
171+
`componentDidMount()` is just that. This collection of components lets you easily build your own
172+
reusable visualization charts or library without having to learn d3. No more selections or
173+
`enter()`/`exit()`/`update()`.
162174

163175
## Status
164176

165-
`Beta` We're still in pre v1. Need to add interactions. No breaking changes planned right now [read more](https://github.com/hshoff/vx/issues/156#issuecomment-331318108). Check out [the road to v1](https://github.com/hshoff/vx/projects/1).
177+
`Beta` We're still in pre v1. Need to add interactions. No breaking changes planned right now
178+
[read more](https://github.com/hshoff/vx/issues/156#issuecomment-331318108). Check out
179+
[the road to v1](https://github.com/hshoff/vx/projects/1).
166180

167-
If you're a curious coder, feel free to install and play around with the packages. I recommend using `--save-exact` when you `npm install`.
181+
If you're a curious coder, feel free to install and play around with the packages. I recommend using
182+
`--save-exact` when you `npm install`.
168183

169184
## Roadmap
170185

171186
Lots coming soon, check out the [roadmap](./ROADMAP.md).
172187

173188
## In the wild
174189

175-
- [williaster/data-ui](https://github.com/williaster/data-ui) ([Demo](https://williaster.github.io/data-ui/))
176-
- [Flaque/data-structures](https://github.com/Flaque/data-structures) ([Interactive explanation of the trie data structure](https://trie.now.sh/))
177-
- [dylanmoz/trello](https://github.com/DylanMoz/dylanmoz.github.io/blob/source/src/pages/trello/TrelloGraph.js) ([Demo](http://dylanmoz.github.io/trello/)) ([How to Make Beautiful Graphs With vx and React-Motion](https://devblog.classy.org/how-to-make-beautiful-graphs-with-vx-and-react-motion-6ffe7aecf6f3))
178-
- [gkunthara/Crypto-Chart](https://github.com/gkunthara/Crypto-Chart) ([Demo](https://www.crypto-chart.com/home)) ([Tutorial](https://medium.com/@georgekunthara/after-the-tutorial-the-first-react-app-4dce6645634e))
179-
- Collapsible tree with [`react-move`](https://github.com/react-tools/react-move) by [@techniq](https://github.com/techniq) ([Demo](https://codesandbox.io/s/n3w687vmqj)) ([Radial demo](https://codesandbox.io/s/vmqwrkl395)) ([More info](https://github.com/hshoff/vx/issues/162#issuecomment-335029517))
180-
- Bitcoin 30-day price by [@hshoff](https://github.com/hshoff) ([Demo](https://viewsource.now.sh/bitcoin)) ([Github](https://github.com/hshoff/viewsource#1-bitcoin-price-chart)) ([YouTube](https://www.youtube.com/watch?v=oeE2tuspdHg))
181-
- Ethereum candlestick chart by [@hshoff](https://github.com/hshoff) ([Demo](https://viewsource.now.sh/ethereum)) ([Github](https://github.com/hshoff/viewsource#2-ethereum-candlestick-chart))
182-
- Song data visualization through spotify by [@bother7](https://github.com/bother7) ([Demo](https://spotalyzer-frontend.herokuapp.com/demo) ([Github](https://github.com/bother7/spotalyzer_frontend))
190+
- [williaster/data-ui](https://github.com/williaster/data-ui)
191+
([Demo](https://williaster.github.io/data-ui/))
192+
- [Flaque/data-structures](https://github.com/Flaque/data-structures)
193+
([Interactive explanation of the trie data structure](https://trie.now.sh/))
194+
- [dylanmoz/trello](https://github.com/DylanMoz/dylanmoz.github.io/blob/source/src/pages/trello/TrelloGraph.js)
195+
([Demo](http://dylanmoz.github.io/trello/))
196+
([How to Make Beautiful Graphs With vx and React-Motion](https://devblog.classy.org/how-to-make-beautiful-graphs-with-vx-and-react-motion-6ffe7aecf6f3))
197+
- [gkunthara/Crypto-Chart](https://github.com/gkunthara/Crypto-Chart)
198+
([Demo](https://www.crypto-chart.com/home))
199+
([Tutorial](https://medium.com/@georgekunthara/after-the-tutorial-the-first-react-app-4dce6645634e))
200+
- Collapsible tree with [`react-move`](https://github.com/react-tools/react-move) by
201+
[@techniq](https://github.com/techniq) ([Demo](https://codesandbox.io/s/n3w687vmqj))
202+
([Radial demo](https://codesandbox.io/s/vmqwrkl395))
203+
([More info](https://github.com/hshoff/vx/issues/162#issuecomment-335029517))
204+
- Bitcoin 30-day price by [@hshoff](https://github.com/hshoff)
205+
([Demo](https://viewsource.now.sh/bitcoin))
206+
([Github](https://github.com/hshoff/viewsource#1-bitcoin-price-chart))
207+
([YouTube](https://www.youtube.com/watch?v=oeE2tuspdHg))
208+
- Ethereum candlestick chart by [@hshoff](https://github.com/hshoff)
209+
([Demo](https://viewsource.now.sh/ethereum))
210+
([Github](https://github.com/hshoff/viewsource#2-ethereum-candlestick-chart))
211+
- Song data visualization through spotify by [@bother7](https://github.com/bother7)
212+
([Demo](https://spotalyzer-frontend.herokuapp.com/demo)
213+
([Github](https://github.com/bother7/spotalyzer_frontend))
183214
- Investment Calculator ([website](https://investmentcalculator.io/))
184215
- Cryptagon - crypto portfolio tracker ([website](https://cryptagon.io/))
185-
- Animation with [`react-spring`](https://github.com/drcmda/react-spring/) by [@drcmda](https://github.com/drcmda) ([Demo](https://codesandbox.io/embed/j3x61vjz5v))
216+
- Animation with [`react-spring`](https://github.com/drcmda/react-spring/) by
217+
[@drcmda](https://github.com/drcmda) ([Demo](https://codesandbox.io/embed/j3x61vjz5v))
186218
- Code Coverage Dashboard by [@ezy](https://github.com/ezy)
187-
([Demo](https://codecov-dash.herokuapp.com/))
188-
([Github](https://github.com/ezy/code-coverage-dashboard))
219+
([Demo](https://codecov-dash.herokuapp.com/))
220+
([Github](https://github.com/ezy/code-coverage-dashboard))
189221
- Ethereum Portfolio Toolkit by [@JayWelsh](https://github.com/JayWelsh)
190-
([Demo](https://cryptocape.com/))
191-
([Github](https://github.com/JayWelsh/CryptoCape))
192-
- Family tree by [@vkallore](https://github.com/vkallore) ([Demo](https://vk-ft.now.sh/))([Github](https://github.com/vkallore/d3-vx-family-tree))
222+
([Demo](https://cryptocape.com/)) ([Github](https://github.com/JayWelsh/CryptoCape))
223+
- Family tree by [@vkallore](https://github.com/vkallore)
224+
([Demo](https://vk-ft.now.sh/))([Github](https://github.com/vkallore/d3-vx-family-tree))
193225
- Have a project that's using vx? Open a pull request and we'll add it to the list.
194226

195227
## FAQ
196228

197229
1. What does `vx` stand for?
198230

199-
> vx stands for visualization components.
231+
> vx stands for visualization components.
200232
201233
1. Do you plan on supporting animation/transitions?
202-
> A common criticism of vx is it doesn't have animation baked in, but this was a concious choice. It's a powerful feature to not bake it in.
203-
>
204-
> Imagine your app already bundles `react-motion`, adding a hypothetical `@vx/animation` is bloat. Since vx is react, it already supports all react animation libs.
205-
>
206-
> Charting libraries are like style guides. Each org or app will eventually want full control over their own implementation.
207-
>
208-
> vx makes this easier for everyone. No need to reinvent the wheel each time.
209-
>
210-
> more info: https://github.com/hshoff/vx/issues/6
211-
>
212-
> examples:
213-
> - Collapsible tree with [`react-move`](https://github.com/react-tools/react-move) by [@techniq](https://github.com/techniq) ([Demo](https://codesandbox.io/s/n3w687vmqj)) ([Radial demo](https://codesandbox.io/s/vmqwrkl395))
214-
> - Animation with `react-spring` by [@drcmda](https://github.com/drcmda) ([Demo](https://codesandbox.io/embed/j3x61vjz5v))
234+
235+
> A common criticism of vx is it doesn't have animation baked in, but this was a concious choice.
236+
> It's a powerful feature to not bake it in.
237+
>
238+
> Imagine your app already bundles `react-motion`, adding a hypothetical `@vx/animation` is
239+
> bloat. Since vx is react, it already supports all react animation libs.
240+
>
241+
> Charting libraries are like style guides. Each org or app will eventually want full control
242+
> over their own implementation.
243+
>
244+
> vx makes this easier for everyone. No need to reinvent the wheel each time.
245+
>
246+
> more info: https://github.com/hshoff/vx/issues/6
247+
>
248+
> examples:
249+
>
250+
> - Collapsible tree with [`react-move`](https://github.com/react-tools/react-move) by
251+
> [@techniq](https://github.com/techniq) ([Demo](https://codesandbox.io/s/n3w687vmqj))
252+
> ([Radial demo](https://codesandbox.io/s/vmqwrkl395))
253+
> - Animation with `react-spring` by [@drcmda](https://github.com/drcmda)
254+
> ([Demo](https://codesandbox.io/embed/j3x61vjz5v))
215255
216256
1. Do I have to use every package to make a chart?
217257

218-
> nope! pick and choose the packages you need.
258+
> nope! pick and choose the packages you need.
219259
220260
1. Can I use this to create my own library of charts for my team?
221261

222-
> Please do.
262+
> Please do.
223263
224264
1. Does vx work with [preact](https://preactjs.com/)?
225265

226-
> yup! need to alias `react` + `react-dom` and use `preact-compat`. Here's a quick demo: https://vx-preact.now.sh/. [more info](https://preactjs.com/guide/switching-to-preact#how-to-alias-preact-compat)
266+
> yup! need to alias `react` + `react-dom` and use `preact-compat`. Here's a quick demo:
267+
> https://vx-preact.now.sh/.
268+
> [more info](https://preactjs.com/guide/switching-to-preact#how-to-alias-preact-compat)
227269
228270
1. I like using d3.
229271

230-
> Me too.
272+
> Me too.
231273
232274
## Development
275+
233276
[lerna](https://github.com/lerna/lerna/) is used to manage versions and dependencies between
234277
packages in the umbrella vx repo.
235278

@@ -249,8 +292,9 @@ vx/
249292
...
250293
```
251294

252-
For easiest development clone or fork vx, install the _root_ dependencies including lerna,
253-
then have lerna install package dependencies and manage the symlinking between packages for you by using the [`lerna bootstrap`](https://github.com/lerna/lerna#bootstrap) command:
295+
For easiest development clone or fork vx, install the _root_ dependencies including lerna, then have
296+
lerna install package dependencies and manage the symlinking between packages for you by using the
297+
[`lerna bootstrap`](https://github.com/lerna/lerna#bootstrap) command:
254298

255299
```sh
256300
git clone [email protected]:hshoff/vx.git # or your fork
@@ -259,7 +303,11 @@ npm install # installs root vx deps
259303
./node_modules/.bin/lerna bootstrap # installs all package deps, sym-links within-vx deps
260304
```
261305

262-
Upon modification of a given package you can run `npm run build` from that package's folder to re-build the package with your changes. You can use the local dev server within `packages/vx-demo` to view and iterate on your changes in the gallery. From the `packages/vx-demo` folder run `npm run dev` to start the next server which (if correctly sym-linked with lerna) will also watch for changes you make to other packages.
306+
Upon modification of a given package you can run `npm run build` from that package's folder to
307+
re-build the package with your changes. You can use the local dev server within `packages/vx-demo`
308+
to view and iterate on your changes in the gallery. From the `packages/vx-demo` folder run
309+
`npm run dev` to start the next server which (if correctly sym-linked with lerna) will also watch
310+
for changes you make to other packages.
263311

264312
:v:
265313

0 commit comments

Comments
 (0)