From ad4651771945adf1040b83f1887ebd9fc88b2c7e Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Wed, 7 Feb 2018 00:00:14 -0800 Subject: [PATCH] Update README.md --- packages/sparkline/README.md | 93 +++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/packages/sparkline/README.md b/packages/sparkline/README.md index 6f60ec33..d83d0d84 100644 --- a/packages/sparkline/README.md +++ b/packages/sparkline/README.md @@ -19,54 +19,59 @@ Sparklines are composable using the container `` component and diff Note that the order of children passed to `` determines their rendering order, for example a `` passed after a `` will overlay the line on the bars. ```javascript -import { Sparkline, LineSeries, HorizontalReferenceLine, LinearGradient } from '@data-ui/sparkline'; -import { allColors } from `@data-ui/theme`; // open-color colors +import { + Sparkline, + LineSeries, + HorizontalReferenceLine, + BandLine, + PatternLines, + PointSeries } from '@data-ui/sparkline'; +import { allColors } from '@data-ui/theme'; // open-color colors const data = Array(25).fill().map(Math.random); -/// ... (Math.random() * (Math.random() > 0.2 ? 1 : 2)))} - valueAccessor={datum => datum} -> - {/* this creates a referenced for fill */} - - {/* display innerquartiles of the data */} - - {/* display the median */} - -{/* Series children are passed the data from the parent Sparkline */} - - val.toFixed(2)} - /> - + ariaLabel="A line graph of randomly-generated data" + margin={{ top: 24, right: 64, bottom: 24, left: 64,}} + width={500} + height={100} + data={data} + valueAccessor={datum => datum} + > + {/* this creates a referenced for fill */} + + {/* display innerquartiles of the data */} + + {/* display the median */} + + {/* Series children are passed the data from the parent Sparkline */} + + val.toFixed(2)} + /> + ``` ## Components