diff --git a/docs/docs.jsx b/docs/docs.jsx
index b0837227..c65ff071 100644
--- a/docs/docs.jsx
+++ b/docs/docs.jsx
@@ -1,5 +1,6 @@
import React from "react";
import ReactDOM from "react-dom";
+import d3Scale from "d3-scale";
import Ecology from "ecology";
import Radium, { Style } from "radium";
import {VictoryAxis} from "victory-axis";
@@ -21,6 +22,7 @@ class Docs extends React.Component {
scope={{
React,
ReactDOM,
+ d3Scale,
VictoryScatter,
VictoryLine,
VictoryAxis,
diff --git a/docs/ecology.md b/docs/ecology.md
index 55a5d031..3970d719 100644
--- a/docs/ecology.md
+++ b/docs/ecology.md
@@ -3,7 +3,7 @@ VictoryChart
A flexible charting component for React. VictoryChart composes other Victory components into reusable charts. Acting as a coordinator rather than a stand-alone component, VictoryChart reconciles props such as `domain` and `scale` for child components, and provides a set of sensible defaults. This component works with:
-- [VictoryAxis](http://github.com/formidablelabs/victory-axis)
+- [VictoryAxis](http://github.com/formidablelabs/victory-axis)
- [VictoryLine](http://github.com/formidablelabs/victory-line)
- [VictoryScatter](http://github.com/formidablelabs/victory-scatter)
- [VictoryBar](http://github.com/formidablelabs/victory-bar)
@@ -23,12 +23,12 @@ VictoryChart was designed to build charts from minimal information. Pass in only
```playground
- 0.5 * x * x}/>
```
-In the example above, VictoryChart was given a VictoryLine component as a child. In addition, it also created a set of VictoryAxis components with the correct domain for the data being plotted by VictoryLine, created tick values based on that data, aligned all of its child components into a correct chart, and applied a set of default styles.
+In the example above, VictoryChart was given a VictoryLine component as a child. In addition, it also created a set of VictoryAxis components with the correct domain for the data being plotted by VictoryLine, created tick values based on that data, aligned all of its child components into a correct chart, and applied a set of default styles.
### Declarative Composition
@@ -36,13 +36,13 @@ VictoryCharts are composed of other Victory components. Compose several componen
```playground
- Math.sin(2 * Math.PI * x)}/>
- Math.cos(2 * Math.PI * x)}/>
@@ -53,22 +53,22 @@ or compose components of different types on the same chart
```playground
-
- 0.3 * x * x}/>
-
@@ -83,26 +83,26 @@ The sensible defaults VictoryChart provides makes it easy to get started, but ev
height={500}
padding={{
top: 75,
- bottom: 40,
- left: 40,
- right: 40
+ bottom: 40,
+ left: 40,
+ right: 40
}}
domainPadding={{x: 20}}>
-
-
-
+
```
Stacked bar charts and non-numeric data are supported too!
@@ -145,21 +145,20 @@ Stacked bar charts and non-numeric data are supported too!
{fill: "tomato"}
]}
labels={[
- "apples\n(fuji)",
- "bananas",
+ "apples\n(fuji)",
+ "bananas",
"oranges\n(navel)"
]}/>
```
-Time series data is also supported:
+Time series data is also supported:
```playground
+ tickFormat={(x) => x.getFullYear()}/>
-
, mountNode);
```
### Props
-
-