Skip to content

Commit

Permalink
Merge branch 'gh-pages' of github.com:spotify/reactochart into gh-pages
Browse files Browse the repository at this point in the history
* 'gh-pages' of github.com:spotify/reactochart: (45 commits)
  Gh pages v3.2.1 (#272)
  Gh pages v3.2.0 (#270)
  Update docs v3.1
  v3.1.0 release
  Update CHANGELOG.md
  3.1.0
  add alignment prop for domain start and end label to keep within chart footprint (#264)
  Gh pages v3.0.3 (#261)
  v3.0.3 release
  3.0.3
  Fix issue with RangeBarChart test (#260)
  Generate docs and add tests for onClick handler (#258)
  allow for onclick event handlers (#257)
  Update sinon to the latest version 🚀 (#235)
  Greenkeeper/husky 4.2.3 (#239)
  chore(package): update raw-loader to version 4.0.0 (#197)
  Greenkeeper/react docgen 5.1.0 (#233)
  v3.0.2 release
  3.0.2
  Remove deprecated Lifecycle hooks (#234)
  ...
  • Loading branch information
acmei committed Dec 10, 2020
2 parents a3a6d24 + ed54025 commit 561dd49
Show file tree
Hide file tree
Showing 32 changed files with 8,554 additions and 14,582 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 3.2.1 (2020-12-04)

- [#271](https://github.com/spotify/reactochart/pull/271) Fix YAxisLabels formatting example. (Thanks @mbonaci)

## 3.2.0 (2020-10-30)

- [#269](https://github.com/spotify/reactochart/pull/269) add nodeSort and linkSort hooks to SankeyDiagram. Remove deprecated refs definition using strings

## 3.1.0 (2020-07-09)

- [#264](https://github.com/spotify/reactochart/pull/264) Added noLabelOverhang prop to XAxisLabels

## 3.0.3 (2020-06-18)

- [#257](https://github.com/spotify/reactochart/pull/257) Added onClick event handler for Bar, BarChart, RangeBarChart, and PieChart - Thanks @jrydberg!
- [#258](https://github.com/spotify/reactochart/pull/258) Updated docs and added testing for onClick event handlers
- Update dependencies via Greenkeeper

## 3.0.2 (2020-02-25)

- [#234](https://github.com/spotify/reactochart/pull/234) Remove deprecated React lifecycle hooks
Expand Down
7 changes: 7 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# These users will be requested for review when someone opens a pull request.
* @acmei @iezer @scottsheffield @ekh64
98 changes: 98 additions & 0 deletions docs/build/bundle.4f42f8f628f6bbc949ac.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/build/bundle.4f42f8f628f6bbc949ac.js.map

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions docs/build/bundle.d280ec63e4e115eb8d08.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/build/bundle.d280ec63e4e115eb8d08.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
</div>

<div class="container-fluid" id="container">Loading...</div>
<script type="text/javascript" src="bundle.3faf9be4fbfdac1fe800.js"></script></body>
</html>
<script type="text/javascript" src="bundle.d280ec63e4e115eb8d08.js"></script></body>
</html>
7 changes: 7 additions & 0 deletions docs/src/docs/Bar/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@
"required": false,
"description": "`mouseleave` event handler callback, called when user's mouse leaves the bar."
},
"onClick": {
"type": {
"name": "func"
},
"required": false,
"description": "`click` event handler callback, called when user clicks the bar."
},
"xScale": {
"type": {
"name": "func"
Expand Down
5 changes: 5 additions & 0 deletions docs/src/docs/BarChart/BarChartDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const examples = [
label: 'Basic BarChart',
codeText: require('./examples/BarChart.js.example').default,
},
{
id: 'gradient',
label: 'BarChart with Linear Gradient',
codeText: require('./examples/BarChartLinearGradient.js.example').default,
},
];

export default class BarChartExamples extends React.Component {
Expand Down
32 changes: 32 additions & 0 deletions docs/src/docs/BarChart/examples/BarChartLinearGradient.js.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const BarChartWithDefs = (props) => {
const data = [
{x: 0, y: 80},
{x: 5, y: 60},
{x: 10, y: 90},
{x: 15, y: 30},
];
return <div>
<svg width="0" height="0" style={{ position: 'absolute' }}>
<defs>
<linearGradient id="Gradient" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stopColor="blue" />
<stop offset="50%" stopColor="white" />
<stop offset="100%" stopColor="red" />
</linearGradient>
</defs>
</svg>
<XYPlot width={400} height={300}>
<XAxis showGrid={false} title="Days since Zombiepocalypse" />
<YAxis title="Zombie Attacks"/>
<BarChart
barStyle={{fill: "url(#Gradient)"}}
data={data}
x={d => d.x}
y={d => d.y}
barThickness={40}
/>
</XYPlot>
</div>
};

ReactDOM.render(<BarChartWithDefs />, mountNode);
7 changes: 7 additions & 0 deletions docs/src/docs/BarChart/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@
},
"required": false,
"description": "`mouseleave` event handler callback, called when user's mouse leaves a bar."
},
"onClick": {
"type": {
"name": "func"
},
"required": false,
"description": "`click` event handler callback, called when user clicks the bar."
}
}
}
23 changes: 23 additions & 0 deletions docs/src/docs/PieChart/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@
],
"returns": null
},
{
"name": "onClick",
"docblock": null,
"modifiers": [],
"params": [
{
"name": "e",
"type": null
},
{
"name": "d",
"type": null
}
],
"returns": null
},
{
"name": "renderMarkerLine",
"docblock": null,
Expand Down Expand Up @@ -442,6 +458,13 @@
},
"required": false,
"description": "`mouseleave` event handler callback, called when user's mouse leaves a pie slice."
},
"onClick": {
"type": {
"name": "func"
},
"required": false,
"description": "`click` event handler callback, called when user click a pie slice."
}
}
}
7 changes: 7 additions & 0 deletions docs/src/docs/RangeBarChart/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@
"required": false,
"description": "`mouseleave` event handler callback, called when user's mouse leaves a bar."
},
"onClick": {
"type": {
"name": "func"
},
"required": false,
"description": "`click` event handler callback, called when user clicks the bar."
},
"showLabels": {
"type": {
"name": "bool"
Expand Down
14 changes: 14 additions & 0 deletions docs/src/docs/SankeyDiagram/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@
"computed": false
}
},
"nodeSort": {
"type": {
"name": "func"
},
"required": false,
"description": "Node sort function"
},
"onMouseEnterNode": {
"type": {
"name": "func"
Expand Down Expand Up @@ -375,6 +382,13 @@
"computed": false
}
},
"linkSort": {
"type": {
"name": "func"
},
"required": false,
"description": "Link sort function"
},
"linkStyle": {
"type": {
"name": "union",
Expand Down
7 changes: 7 additions & 0 deletions docs/src/docs/XAxis/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@
"required": false,
"description": ""
},
"noLabelOverhang": {
"type": {
"name": "bool"
},
"required": false,
"description": ""
},
"labelOffset": {
"type": {
"name": "number"
Expand Down
7 changes: 7 additions & 0 deletions docs/src/docs/XAxisLabels/propDocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@
"required": false,
"description": "Custom labels provided. Note that each object in the array has to be of shape.\n`{\n value,\n text,\n height,\n width\n}`\nvalue - value you'd like this label to be aligned with\ntext - text you'd like displayed\nheight - height of the given label\nwidth - width of the given label"
},
"noLabelOverhang": {
"type": {
"name": "bool"
},
"required": false,
"description": "Default label behavior places the text centered below the data point it delineates. This can allow\noverhang where the first and possibly last labels' text hangs over the edges of the x axis range.\nSetting this to `true` will force the first and last labels to align in such a way that their text does\nnot exceed the x range. That is, the first label will be text-anchor: \"start\" instead of \"middle\", and\nthe label marking the right edge of the chart will be anchored to the \"end\" instead of \"middle\".\n\nThis affects spacing calculations."
},
"nice": {
"type": {
"name": "bool"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/YAxisLabels/examples/YAxisLabels.js.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const YAxisLabelsExample = (props) => {
position="right"
tickCount={5}
labelStyle={(label) => {
const is20 = label.text === "20.00"
const is20 = Math.abs(label.value) === 20;
return {
fill: is20 ? "green" : "black",
fontWeight: is20 ? 900 : 400
Expand Down
Loading

0 comments on commit 561dd49

Please sign in to comment.