diff --git a/docs/src/docs/BarChart/BarChartDocs.js b/docs/src/docs/BarChart/BarChartDocs.js index 1a4ab6c1..973120dc 100644 --- a/docs/src/docs/BarChart/BarChartDocs.js +++ b/docs/src/docs/BarChart/BarChartDocs.js @@ -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 { diff --git a/docs/src/docs/BarChart/examples/BarChartLinearGradient.js.example b/docs/src/docs/BarChart/examples/BarChartLinearGradient.js.example new file mode 100644 index 00000000..c0714231 --- /dev/null +++ b/docs/src/docs/BarChart/examples/BarChartLinearGradient.js.example @@ -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
+ + + + + + + + + + + + + d.x} + y={d => d.y} + barThickness={40} + /> + +
+}; + +ReactDOM.render(, mountNode);