Showing preview only (252K chars total). Download the full file or copy to clipboard to get everything.
Repository: borisyankov/react-sparklines
Branch: master
Commit: a30c20e49ee6
Files: 40
Total size: 239.9 KB
Directory structure:
gitextract_9dwoz21r/
├── .babelrc
├── .gitignore
├── .npmignore
├── .travis.yml
├── LICENSE
├── README.md
├── __tests__/
│ ├── Sparklines.js
│ ├── compareSvg.js
│ ├── dataToPoints.js
│ ├── fixtures.js
│ ├── graphical-tests.js
│ ├── mean.js
│ ├── median.js
│ └── sampleData.js
├── bootstrap-tests.js
├── build/
│ └── index.js
├── demo/
│ ├── demo.js
│ ├── index.html
│ └── webpack.config.js
├── index.js
├── package.json
├── src/
│ ├── Sparklines.js
│ ├── SparklinesBars.js
│ ├── SparklinesCurve.js
│ ├── SparklinesLine.js
│ ├── SparklinesNormalBand.js
│ ├── SparklinesReferenceLine.js
│ ├── SparklinesSpots.js
│ ├── SparklinesText.js
│ └── dataProcessing/
│ ├── dataToPoints.js
│ ├── index.js
│ ├── max.js
│ ├── mean.js
│ ├── median.js
│ ├── midRange.js
│ ├── min.js
│ ├── stdev.js
│ └── variance.js
├── wallaby.conf.js
└── webpack.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .babelrc
================================================
{
"presets": [
"react",
"es2015",
"stage-1"
],
"plugins": [
"transform-object-assign"
],
"sourceMaps": true,
}
================================================
FILE: .gitignore
================================================
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
# build
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
.DS_Store
.idea
================================================
FILE: .npmignore
================================================
node_modules
demo
wallaby.conf.js
================================================
FILE: .travis.yml
================================================
language: node_js
before_install: npm install -g npm@3
script: travis_retry npm test
node_js:
- '7'
sudo: false
================================================
FILE: LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Boris Yankov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Beautiful and expressive sparklines component for React
[](https://travis-ci.org/borisyankov/react-sparklines)
Live demos and docs: [borisyankov.github.io/react-sparklines/](http://borisyankov.github.io/react-sparklines/)

## Install
```
npm install react-sparklines --save
```
## Run demo
```
npm install
npm start
http://localhost:8080
```
## Use
Import the Sparklines components that you need; for example to generate a simple chart:

```
import React from 'react';
import { Sparklines } from 'react-sparklines';
...
<Sparklines data={[5, 10, 5, 20, 8, 15]} limit={5} width={100} height={20} margin={5}>
</Sparklines>
```
Sparklines component is a container with the following properties:
data - the data set used to build the sparkline
limit - optional, how many data points to display at once
width, height - dimensions of the generated sparkline in the SVG viewbox. This will be automatically scaled (i.e. responsive) inside the parent container by default.
svgWidth, svgHeight - If you want absolute dimensions instead of a responsive component set these attributes.
[preserveAspectRatio](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio) - default: 'none', set this to modify how the sparkline should scale
margin - optional, offset the chart
min, max - optional, bound the chart
#### Basic Sparkline

```
import React from 'react';
import { Sparklines, SparklinesLine } from 'react-sparklines';
...
<Sparklines data={[5, 10, 5, 20]}>
<SparklinesLine color="blue" />
</Sparklines>
```
#### Bars

```
import React from 'react';
import { Sparklines, SparklinesBars } from 'react-sparklines';
...
<Sparklines data={[5, 10, 5, 20]}>
<SparklinesBars />
</Sparklines>
```
#### Spots

```
import React from 'react';
import { Sparklines, SparklinesLine, SparklinesSpots } from 'react-sparklines';
...
<Sparklines data={sampleData}>
<SparklinesLine style={{ fill: "none" }} />
<SparklinesSpots />
</Sparklines>
```
#### Reference Line

```
import React from 'react';
import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines';
...
<Sparklines data={sampleData}>
<SparklinesLine />
<SparklinesReferenceLine type="mean" />
</Sparklines>
```
#### Normal Band

```
import React from 'react';
import { Sparklines, SparklinesLine, SparklinesNormalBand } from 'react-sparklines';
...
<Sparklines data={sampleData}>
<SparklinesLine style={{ fill: "none" }}/>
<SparklinesNormalBand />
</Sparklines>
```
================================================
FILE: __tests__/Sparklines.js
================================================
import React from 'react';
import ReactDOM from 'react-dom';
import { shallow } from 'enzyme';
import { expect } from 'chai';
import { Sparklines } from '../src/Sparklines';
describe('Sparklines', () => {
it('does not throw without any parameters', () => {
expect(() => <Sparklines />).to.not.throw;
});
it('renders nothing when passed no data', () => {
const wrapper = shallow(<Sparklines />);
expect(wrapper.find('svg')).to.have.length(0);
});
it('is rendered as svg', () => {
const wrapper = shallow(<Sparklines data={[1]} />);
expect(wrapper.find('svg')).to.have.length(1);
});
});
================================================
FILE: __tests__/compareSvg.js
================================================
import hiff from 'hiff';
function normalizeStyle(style) {
style = (style || '').split(';').map(s => s.trim());
style.sort();
return style.join(';');
}
function normalizeAttrs(...$ns) {
for (let $n of $ns) {
if ($n.attr('style'))
$n.attr('style', normalizeStyle($n.attr('style')));
}
}
function comparatorFn($n1, $n2, childChanges) {
normalizeAttrs($n1, $n2);
return hiff.defaultTagComparisonFn($n1, $n2, childChanges);
}
export default function compareSvg(svg1, svg2, options = {}) {
return hiff.compare(svg1, svg2, Object.assign({}, options, {tagComparison: comparatorFn}));
}
================================================
FILE: __tests__/dataToPoints.js
================================================
import { expect } from 'chai';
import dataToPoints from '../src/dataProcessing/dataToPoints';
describe('dataToPoints', () => {
it('should return an array', () => {
expect(dataToPoints({ data: [] })).to.be.an('array');
expect(dataToPoints({ data: [1, 2, 3] })).to.be.an('array');
expect(dataToPoints({ data: [1, null, undefined] })).to.be.an('array');
});
it('should return only `limit` items', () => {
expect(dataToPoints({ data: [1,2,3,4,5] })).to.have.length(5);
expect(dataToPoints({ data: [1,2,3,4,5], limit: 2 })).to.have.length(2);
expect(dataToPoints({ data: [1,2,3,4,5], limit: 5 })).to.have.length(5);
expect(dataToPoints({ data: [1,2,3,4,5], limit: 10 })).to.have.length(5);
});
it('should return proper values for 1 value', () => {
expect(dataToPoints({ data: [1] })).to.eql([
{x: 0, y: 0.5}
])
});
it('should return proper values 2+ values', () => {
expect(dataToPoints({ data: [1,1] })).to.eql([
{x: 0, y: 0.5},
{x: 1, y: 0.5}
])
expect(dataToPoints({ data: [0,1] })).to.eql([
{x: 0, y: 1},
{x: 1, y: 0}
])
expect(dataToPoints({ data: [1,0] })).to.eql([
{x: 0, y: 0},
{x: 1, y: 1}
])
expect(dataToPoints({ data: [0,1,2] })).to.eql([
{x: 0, y: 1},
{x: 0.5, y: 0.5},
{x: 1, y: 0}
])
});
it('should inerpolate values properly', () => {
expect(dataToPoints({data: [0,1,2], width: 10, height: 10 })).to.eql([
{x: 0, y: 10},
{x: 5, y: 5},
{x: 10, y: 0}
])
});
it('should take min and max into account', () => {
expect(dataToPoints({ data: [1,2,3,4], width: 6, height: 10, max: 2, min: 3 })).to.eql([
{x: 0, y: -10},
{x: 2, y: 0},
{x: 4, y: 10},
{x: 6, y: 20}
])
});
it('should return y == height for 0 and null values', () => {
expect(dataToPoints({ data: [0] })).to.eql([
{x: 0, y: 0.5}
])
expect(dataToPoints({ data: [0, null, 0] })).to.eql([
{x: 0, y: 0.5},
{x: 0.5, y: 0.5},
{x: 1, y: 0.5}
])
});
});
================================================
FILE: __tests__/fixtures.js
================================================
// This file is auto-updated by ../bootstrap-tests.js
import React from 'react';
import { Sparklines, SparklinesBars, SparklinesLine, SparklinesCurve, SparklinesNormalBand, SparklinesReferenceLine, SparklinesSpots } from '../src/Sparklines';
import { sampleData, sampleData100 } from './sampleData';
export default {
// AUTO-GENERATED PART STARTS HERE
"Header": {jsx: (<Sparklines data={sampleData} height={50} margin={2} width={300}><SparklinesLine style={{fill: 'none', stroke: 'white'}} /><SparklinesReferenceLine style={{stroke: 'white', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="mean" /></Sparklines>), svg: "<svg width=\"300\" height=\"50\" viewbox=\"0 0 300 50\"><g><polyline points=\"2 26.066887020955583 12.206896551724139 45.54652927110727 22.413793103448278 33.90636931938852 32.62068965517241 29.177549752086648 42.827586206896555 29.70109352684341 53.0344827586207 18.925334070012052 63.24137931034483 29.183773465122954 73.44827586206897 28.764398923777502 83.65517241379311 40.544557819288656 93.86206896551725 46.193633191864905 104.0689655172414 21.703120571572512 114.27586206896552 40.61831611300432 124.48275862068967 13.98423022262012 134.6896551724138 48 144.89655172413794 32.86055861856278 155.1034482758621 30.010522516938543 165.31034482758622 24.96935553482233 175.51724137931035 2 185.7241379310345 30.93720854362344 195.93103448275863 19.786564180834066 206.1379310344828 10.399459049869085 216.34482758620692 18.567297273634907 226.55172413793105 36.15784561748332 236.7586206896552 16.643282623666856 246.96551724137933 14.17303219422537 257.1724137931035 26.858302516540814 267.3793103448276 15.483001054391034 277.58620689655174 38.10432333408586 287.7931034482759 35.43208580179642 298 31.607765704956066 298 48 2 48 2 26.066887020955583\" style=\"stroke:white;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 26.066887020955583 12.206896551724139 45.54652927110727 22.413793103448278 33.90636931938852 32.62068965517241 29.177549752086648 42.827586206896555 29.70109352684341 53.0344827586207 18.925334070012052 63.24137931034483 29.183773465122954 73.44827586206897 28.764398923777502 83.65517241379311 40.544557819288656 93.86206896551725 46.193633191864905 104.0689655172414 21.703120571572512 114.27586206896552 40.61831611300432 124.48275862068967 13.98423022262012 134.6896551724138 48 144.89655172413794 32.86055861856278 155.1034482758621 30.010522516938543 165.31034482758622 24.96935553482233 175.51724137931035 2 185.7241379310345 30.93720854362344 195.93103448275863 19.786564180834066 206.1379310344828 10.399459049869085 216.34482758620692 18.567297273634907 226.55172413793105 36.15784561748332 236.7586206896552 16.643282623666856 246.96551724137933 14.17303219422537 257.1724137931035 26.858302516540814 267.3793103448276 15.483001054391034 277.58620689655174 38.10432333408586 287.7931034482759 35.43208580179642 298 31.607765704956066\" style=\"stroke:white;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><line x1=\"2\" y1=\"25\" x2=\"298\" y2=\"25\" style=\"stroke:white;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"Simple": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"SimpleCurve": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesCurve style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><path d=\"M2 31.298818982032884 C 4.0344827586206895 31.298818982032884 8.103448275862068 55.01316606917407 10.137931034482758 55.01316606917407 C 12.172413793103448 55.01316606917407 16.241379310344826 40.842536562733855 18.275862068965516 40.842536562733855 C 20.310344827586206 40.842536562733855 24.379310344827584 35.085712741670704 26.413793103448274 35.085712741670704 C 28.448275862068964 35.085712741670704 32.51724137931034 35.72307038050503 34.55172413793103 35.72307038050503 C 36.58620689655172 35.72307038050503 40.6551724137931 22.604754520014673 42.689655172413794 22.604754520014673 C 44.724137931034484 22.604754520014673 48.79310344827586 35.09328943580186 50.82758620689655 35.09328943580186 C 52.86206896551724 35.09328943580186 56.93103448275861 34.582746515903054 58.9655172413793 34.582746515903054 C 60.99999999999999 34.582746515903054 65.06896551724137 48.92380951913402 67.10344827586206 48.92380951913402 C 69.13793103448276 48.92380951913402 73.20689655172413 55.80094475531381 75.24137931034483 55.80094475531381 C 77.27586206896552 55.80094475531381 81.34482758620689 25.98640765234915 83.37931034482759 25.98640765234915 C 85.41379310344827 25.98640765234915 89.48275862068965 49.013602224527006 91.51724137931033 49.013602224527006 C 93.55172413793102 49.013602224527006 97.62068965517241 16.58949766232015 99.6551724137931 16.58949766232015 C 101.68965517241378 16.58949766232015 105.75862068965517 58 107.79310344827586 58 C 109.82758620689654 58 113.89655172413792 39.56937570955469 115.9310344827586 39.56937570955469 C 117.9655172413793 39.56937570955469 122.03448275862067 36.09976654235997 124.06896551724137 36.09976654235997 C 126.10344827586206 36.09976654235997 130.17241379310343 29.96269369456632 132.20689655172413 29.96269369456632 C 134.24137931034483 29.96269369456632 138.3103448275862 2 140.3448275862069 2 C 142.3793103448276 2 146.44827586206895 37.2279060531068 148.48275862068965 37.2279060531068 C 150.51724137931035 37.2279060531068 154.58620689655172 23.65320856797191 156.6206896551724 23.65320856797191 C 158.6551724137931 23.65320856797191 162.72413793103448 12.225428408536278 164.75862068965517 12.225428408536278 C 166.79310344827587 12.225428408536278 170.8620689655172 22.168883637468582 172.8965517241379 22.168883637468582 C 174.9310344827586 22.168883637468582 178.99999999999997 43.5834642299797 181.03448275862067 43.5834642299797 C 183.06896551724137 43.5834642299797 187.13793103448273 19.82660493315965 189.17241379310343 19.82660493315965 C 191.20689655172413 19.82660493315965 195.2758620689655 16.819343540796105 197.3103448275862 16.819343540796105 C 199.3448275862069 16.819343540796105 203.41379310344826 32.262281324484476 205.44827586206895 32.262281324484476 C 207.48275862068965 32.262281324484476 211.55172413793102 18.414088240128216 213.58620689655172 18.414088240128216 C 215.6206896551724 18.414088240128216 219.68965517241378 45.95308927627845 221.72413793103448 45.95308927627845 C 223.75862068965517 45.95308927627845 227.8275862068965 42.699930541317386 229.8620689655172 42.699930541317386 C 231.8965517241379 42.699930541317386 235.96551724137927 38.0442365103813 237.99999999999997 38.0442365103813 L237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><path d=\"M2 31.298818982032884 C 4.0344827586206895 31.298818982032884 8.103448275862068 55.01316606917407 10.137931034482758 55.01316606917407 C 12.172413793103448 55.01316606917407 16.241379310344826 40.842536562733855 18.275862068965516 40.842536562733855 C 20.310344827586206 40.842536562733855 24.379310344827584 35.085712741670704 26.413793103448274 35.085712741670704 C 28.448275862068964 35.085712741670704 32.51724137931034 35.72307038050503 34.55172413793103 35.72307038050503 C 36.58620689655172 35.72307038050503 40.6551724137931 22.604754520014673 42.689655172413794 22.604754520014673 C 44.724137931034484 22.604754520014673 48.79310344827586 35.09328943580186 50.82758620689655 35.09328943580186 C 52.86206896551724 35.09328943580186 56.93103448275861 34.582746515903054 58.9655172413793 34.582746515903054 C 60.99999999999999 34.582746515903054 65.06896551724137 48.92380951913402 67.10344827586206 48.92380951913402 C 69.13793103448276 48.92380951913402 73.20689655172413 55.80094475531381 75.24137931034483 55.80094475531381 C 77.27586206896552 55.80094475531381 81.34482758620689 25.98640765234915 83.37931034482759 25.98640765234915 C 85.41379310344827 25.98640765234915 89.48275862068965 49.013602224527006 91.51724137931033 49.013602224527006 C 93.55172413793102 49.013602224527006 97.62068965517241 16.58949766232015 99.6551724137931 16.58949766232015 C 101.68965517241378 16.58949766232015 105.75862068965517 58 107.79310344827586 58 C 109.82758620689654 58 113.89655172413792 39.56937570955469 115.9310344827586 39.56937570955469 C 117.9655172413793 39.56937570955469 122.03448275862067 36.09976654235997 124.06896551724137 36.09976654235997 C 126.10344827586206 36.09976654235997 130.17241379310343 29.96269369456632 132.20689655172413 29.96269369456632 C 134.24137931034483 29.96269369456632 138.3103448275862 2 140.3448275862069 2 C 142.3793103448276 2 146.44827586206895 37.2279060531068 148.48275862068965 37.2279060531068 C 150.51724137931035 37.2279060531068 154.58620689655172 23.65320856797191 156.6206896551724 23.65320856797191 C 158.6551724137931 23.65320856797191 162.72413793103448 12.225428408536278 164.75862068965517 12.225428408536278 C 166.79310344827587 12.225428408536278 170.8620689655172 22.168883637468582 172.8965517241379 22.168883637468582 C 174.9310344827586 22.168883637468582 178.99999999999997 43.5834642299797 181.03448275862067 43.5834642299797 C 183.06896551724137 43.5834642299797 187.13793103448273 19.82660493315965 189.17241379310343 19.82660493315965 C 191.20689655172413 19.82660493315965 195.2758620689655 16.819343540796105 197.3103448275862 16.819343540796105 C 199.3448275862069 16.819343540796105 203.41379310344826 32.262281324484476 205.44827586206895 32.262281324484476 C 207.48275862068965 32.262281324484476 211.55172413793102 18.414088240128216 213.58620689655172 18.414088240128216 C 215.6206896551724 18.414088240128216 219.68965517241378 45.95308927627845 221.72413793103448 45.95308927627845 C 223.75862068965517 45.95308927627845 227.8275862068965 42.699930541317386 229.8620689655172 42.699930541317386 C 231.8965517241379 42.699930541317386 235.96551724137927 38.0442365103813 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Customizable1": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine color="#1c8cdc" style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:#1c8cdc;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#1c8cdc;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Customizable2": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine color="#fa7e17" style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:#fa7e17;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#fa7e17;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Customizable3": {jsx: (<Sparklines data={sampleData} height={61} margin={2} width={240}><SparklinesLine color="#ea485c" style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"61\" viewbox=\"0 0 240 61\"><g><polyline points=\"2 31.822012178140614 10.137931034482758 55.959829748980745 18.275862068965516 41.53615328706839 26.413793103448274 35.676529040629106 34.55172413793103 36.325268065871185 42.689655172413794 22.972696565014935 50.82758620689655 35.68424103286975 58.9655172413793 35.1645812751156 67.10344827586206 49.761734689118555 75.24137931034483 56.76167591165869 83.37931034482759 26.41473636042681 91.51724137931033 49.85313083567927 99.6551724137931 16.85002440629015 107.79310344827586 59 115.9310344827586 40.240257418653876 124.06896551724137 36.70869094490211 132.20689655172413 30.462027510540715 140.3448275862069 2 148.48275862068965 37.85697580405513 156.6206896551724 24.039873006685696 164.75862068965517 12.408025344402997 172.8965517241379 22.52904227385195 181.03448275862067 44.32602609122933 189.17241379310343 20.144937164108928 197.3103448275862 17.083974675453177 205.44827586206895 32.802679205278835 213.58620689655172 18.707196958701935 221.72413793103448 46.7379658704977 229.8620689655172 43.42671501526948 237.99999999999997 38.687883590923825 237.99999999999997 59 2 59 2 31.822012178140614\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:#ea485c;\"/><polyline points=\"2 31.822012178140614 10.137931034482758 55.959829748980745 18.275862068965516 41.53615328706839 26.413793103448274 35.676529040629106 34.55172413793103 36.325268065871185 42.689655172413794 22.972696565014935 50.82758620689655 35.68424103286975 58.9655172413793 35.1645812751156 67.10344827586206 49.761734689118555 75.24137931034483 56.76167591165869 83.37931034482759 26.41473636042681 91.51724137931033 49.85313083567927 99.6551724137931 16.85002440629015 107.79310344827586 59 115.9310344827586 40.240257418653876 124.06896551724137 36.70869094490211 132.20689655172413 30.462027510540715 140.3448275862069 2 148.48275862068965 37.85697580405513 156.6206896551724 24.039873006685696 164.75862068965517 12.408025344402997 172.8965517241379 22.52904227385195 181.03448275862067 44.32602609122933 189.17241379310343 20.144937164108928 197.3103448275862 17.083974675453177 205.44827586206895 32.802679205278835 213.58620689655172 18.707196958701935 221.72413793103448 46.7379658704977 229.8620689655172 43.42671501526948 237.99999999999997 38.687883590923825\" style=\"stroke:#ea485c;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Customizable4": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine color="#56b45d" style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:#56b45d;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#56b45d;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Customizable5": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine color="#8e44af" style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:#8e44af;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#8e44af;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Customizable6": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine color="#253e56" style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:#253e56;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#253e56;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Bounds1": {jsx: (<Sparklines data={sampleData} height={60} margin={2} max={0.5} width={240}><SparklinesLine style={{}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 7.670103552396827 10.137931034482758 52.37002272133571 18.275862068965516 25.659357182737544 26.413793103448274 14.808138782089328 34.55172413793103 16.009514254621237 42.689655172413794 -8.717612174024529 50.82758620689655 14.822420331312934 58.9655172413793 13.860081913649916 67.10344827586206 40.89200291427838 75.24137931034483 53.85493156002574 83.37931034482759 -2.343427756579426 91.51724137931033 41.06125601065409 99.6551724137931 -20.055959138894096 107.79310344827586 58 115.9310344827586 23.25953622131521 124.06896551724137 16.719560705585764 132.20689655172413 5.151598947152368 140.3448275862069 -47.55616244724296 148.48275862068965 18.846026374506227 156.6206896551724 -6.741348141798753 164.75862068965517 -28.281930622526744 172.8965517241379 -9.539198918382716 181.03448275862067 30.825818005950843 189.17241379310343 -13.954233764967562 197.3103448275862 -19.622715408782717 205.44827586206895 9.486164044032915 213.58620689655172 -16.616730934772352 221.72413793103448 35.29239883320382 229.8620689655172 29.160417549378508 237.99999999999997 20.38475334519728 237.99999999999997 58 2 58 2 7.670103552396827\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><polyline points=\"2 7.670103552396827 10.137931034482758 52.37002272133571 18.275862068965516 25.659357182737544 26.413793103448274 14.808138782089328 34.55172413793103 16.009514254621237 42.689655172413794 -8.717612174024529 50.82758620689655 14.822420331312934 58.9655172413793 13.860081913649916 67.10344827586206 40.89200291427838 75.24137931034483 53.85493156002574 83.37931034482759 -2.343427756579426 91.51724137931033 41.06125601065409 99.6551724137931 -20.055959138894096 107.79310344827586 58 115.9310344827586 23.25953622131521 124.06896551724137 16.719560705585764 132.20689655172413 5.151598947152368 140.3448275862069 -47.55616244724296 148.48275862068965 18.846026374506227 156.6206896551724 -6.741348141798753 164.75862068965517 -28.281930622526744 172.8965517241379 -9.539198918382716 181.03448275862067 30.825818005950843 189.17241379310343 -13.954233764967562 197.3103448275862 -19.622715408782717 205.44827586206895 9.486164044032915 213.58620689655172 -16.616730934772352 221.72413793103448 35.29239883320382 229.8620689655172 29.160417549378508 237.99999999999997 20.38475334519728\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"Spots1": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{fill: 'none'}} /><SparklinesSpots size={2} spotColors={{'0': 'black', '1': 'green', '-1': 'red'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><g><circle cx=\"237.99999999999997\" cy=\"38.0442365103813\" r=\"2\" style=\"fill:green;\"/></g></svg>"},
"Spots2": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine color="#56b45d" style={{}} /><SparklinesSpots size={2} spotColors={{'0': 'black', '1': 'green', '-1': 'red'}} style={{fill: '#56b45d'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:#56b45d;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#56b45d;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><g><circle cx=\"2\" cy=\"31.298818982032884\" r=\"2\" style=\"fill:#56b45d;\"/><circle cx=\"237.99999999999997\" cy=\"38.0442365103813\" r=\"2\" style=\"fill:#56b45d;\"/></g></svg>"},
"Spots3": {jsx: (<Sparklines data={sampleData} height={60} margin={6} width={240}><SparklinesLine style={{fill: 'none', stroke: '#336aff', strokeWidth: 3}} /><SparklinesSpots size={4} spotColors={{'0': 'black', '1': 'green', '-1': 'red'}} style={{fill: 'white', stroke: '#336aff', strokeWidth: 3}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"6 31.113273413171044 13.862068965517242 51.43985663072063 21.724137931034484 39.29360276805759 29.586206896551722 34.359182350003465 37.44827586206897 34.90548889757574 45.310344827586206 23.661218160012577 53.172413793103445 34.36567665925874 61.03448275862069 33.928068442202616 68.89655172413794 46.22040815925773 76.75862068965517 52.11509550455469 84.62068965517241 26.55977798772784 92.48275862068965 46.29737333530886 100.34482758620689 18.505283710560125 108.20689655172413 54 116.06896551724138 38.20232203676116 123.93103448275862 35.22837132202283 131.79310344827587 29.96802316677113 139.6551724137931 6 147.51724137931035 36.19534804552012 155.3793103448276 24.559893058261636 163.24137931034483 14.764652921602524 171.10344827586206 23.28761454640164 178.9655172413793 41.6429693399826 186.82758620689654 21.279947085565414 194.68965517241378 18.702294463539516 202.55172413793102 31.93909827812955 210.41379310344826 20.06921849153847 218.27586206896552 43.67407652252439 226.13793103448276 40.88565474970061 234 36.895059866041116 234 54 6 54 6 31.113273413171044\" style=\"stroke:#336aff;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"6 31.113273413171044 13.862068965517242 51.43985663072063 21.724137931034484 39.29360276805759 29.586206896551722 34.359182350003465 37.44827586206897 34.90548889757574 45.310344827586206 23.661218160012577 53.172413793103445 34.36567665925874 61.03448275862069 33.928068442202616 68.89655172413794 46.22040815925773 76.75862068965517 52.11509550455469 84.62068965517241 26.55977798772784 92.48275862068965 46.29737333530886 100.34482758620689 18.505283710560125 108.20689655172413 54 116.06896551724138 38.20232203676116 123.93103448275862 35.22837132202283 131.79310344827587 29.96802316677113 139.6551724137931 6 147.51724137931035 36.19534804552012 155.3793103448276 24.559893058261636 163.24137931034483 14.764652921602524 171.10344827586206 23.28761454640164 178.9655172413793 41.6429693399826 186.82758620689654 21.279947085565414 194.68965517241378 18.702294463539516 202.55172413793102 31.93909827812955 210.41379310344826 20.06921849153847 218.27586206896552 43.67407652252439 226.13793103448276 40.88565474970061 234 36.895059866041116\" style=\"stroke:#336aff;stroke-width:3;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><g><circle cx=\"6\" cy=\"31.113273413171044\" r=\"4\" style=\"fill:white;stroke:#336aff;stroke-width:3;\"/><circle cx=\"234\" cy=\"36.895059866041116\" r=\"4\" style=\"fill:white;stroke:#336aff;stroke-width:3;\"/></g></svg>"},
"Bars1": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesBars style={{fill: '#41c3f9'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><rect x=\"2\" y=\"32\" width=\"9\" height=\"29\" style=\"fill:#41c3f9;\"/><rect x=\"11\" y=\"56\" width=\"9\" height=\"5\" style=\"fill:#41c3f9;\"/><rect x=\"19\" y=\"41\" width=\"9\" height=\"20\" style=\"fill:#41c3f9;\"/><rect x=\"27\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:#41c3f9;\"/><rect x=\"35\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:#41c3f9;\"/><rect x=\"43\" y=\"23\" width=\"9\" height=\"38\" style=\"fill:#41c3f9;\"/><rect x=\"51\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:#41c3f9;\"/><rect x=\"59\" y=\"35\" width=\"9\" height=\"26\" style=\"fill:#41c3f9;\"/><rect x=\"68\" y=\"49\" width=\"9\" height=\"12\" style=\"fill:#41c3f9;\"/><rect x=\"76\" y=\"56\" width=\"9\" height=\"5\" style=\"fill:#41c3f9;\"/><rect x=\"84\" y=\"26\" width=\"9\" height=\"35\" style=\"fill:#41c3f9;\"/><rect x=\"92\" y=\"50\" width=\"9\" height=\"11\" style=\"fill:#41c3f9;\"/><rect x=\"100\" y=\"17\" width=\"9\" height=\"44\" style=\"fill:#41c3f9;\"/><rect x=\"108\" y=\"58\" width=\"9\" height=\"2\" style=\"fill:#41c3f9;\"/><rect x=\"116\" y=\"40\" width=\"9\" height=\"21\" style=\"fill:#41c3f9;\"/><rect x=\"125\" y=\"37\" width=\"9\" height=\"24\" style=\"fill:#41c3f9;\"/><rect x=\"133\" y=\"30\" width=\"9\" height=\"31\" style=\"fill:#41c3f9;\"/><rect x=\"141\" y=\"2\" width=\"9\" height=\"58\" style=\"fill:#41c3f9;\"/><rect x=\"149\" y=\"38\" width=\"9\" height=\"23\" style=\"fill:#41c3f9;\"/><rect x=\"157\" y=\"24\" width=\"9\" height=\"37\" style=\"fill:#41c3f9;\"/><rect x=\"165\" y=\"13\" width=\"9\" height=\"48\" style=\"fill:#41c3f9;\"/><rect x=\"173\" y=\"23\" width=\"9\" height=\"38\" style=\"fill:#41c3f9;\"/><rect x=\"182\" y=\"44\" width=\"9\" height=\"17\" style=\"fill:#41c3f9;\"/><rect x=\"190\" y=\"20\" width=\"9\" height=\"41\" style=\"fill:#41c3f9;\"/><rect x=\"198\" y=\"17\" width=\"9\" height=\"44\" style=\"fill:#41c3f9;\"/><rect x=\"206\" y=\"33\" width=\"9\" height=\"28\" style=\"fill:#41c3f9;\"/><rect x=\"214\" y=\"19\" width=\"9\" height=\"42\" style=\"fill:#41c3f9;\"/><rect x=\"222\" y=\"46\" width=\"9\" height=\"15\" style=\"fill:#41c3f9;\"/><rect x=\"230\" y=\"43\" width=\"9\" height=\"18\" style=\"fill:#41c3f9;\"/><rect x=\"238\" y=\"39\" width=\"9\" height=\"22\" style=\"fill:#41c3f9;\"/></g></svg>"},
"Bars2": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesBars style={{fill: '#41c3f9', fillOpacity: '.25', stroke: 'white'}} /><SparklinesLine style={{fill: 'none', stroke: '#41c3f9'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><rect x=\"2\" y=\"32\" width=\"9\" height=\"29\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"11\" y=\"56\" width=\"9\" height=\"5\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"19\" y=\"41\" width=\"9\" height=\"20\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"27\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"35\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"43\" y=\"23\" width=\"9\" height=\"38\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"51\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"59\" y=\"35\" width=\"9\" height=\"26\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"68\" y=\"49\" width=\"9\" height=\"12\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"76\" y=\"56\" width=\"9\" height=\"5\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"84\" y=\"26\" width=\"9\" height=\"35\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"92\" y=\"50\" width=\"9\" height=\"11\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"100\" y=\"17\" width=\"9\" height=\"44\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"108\" y=\"58\" width=\"9\" height=\"2\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"116\" y=\"40\" width=\"9\" height=\"21\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"125\" y=\"37\" width=\"9\" height=\"24\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"133\" y=\"30\" width=\"9\" height=\"31\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"141\" y=\"2\" width=\"9\" height=\"58\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"149\" y=\"38\" width=\"9\" height=\"23\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"157\" y=\"24\" width=\"9\" height=\"37\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"165\" y=\"13\" width=\"9\" height=\"48\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"173\" y=\"23\" width=\"9\" height=\"38\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"182\" y=\"44\" width=\"9\" height=\"17\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"190\" y=\"20\" width=\"9\" height=\"41\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"198\" y=\"17\" width=\"9\" height=\"44\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"206\" y=\"33\" width=\"9\" height=\"28\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"214\" y=\"19\" width=\"9\" height=\"42\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"222\" y=\"46\" width=\"9\" height=\"15\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"230\" y=\"43\" width=\"9\" height=\"18\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/><rect x=\"238\" y=\"39\" width=\"9\" height=\"22\" style=\"fill:#41c3f9;fill-opacity:.25;stroke:white;\"/></g><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:#41c3f9;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#41c3f9;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"ReferenceLine1": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{}} /><SparklinesReferenceLine style={{stroke: 'red', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="max" /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><line x1=\"2\" y1=\"60\" x2=\"237.99999999999997\" y2=\"60\" style=\"stroke:red;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"ReferenceLine2": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{}} /><SparklinesReferenceLine style={{stroke: 'red', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="min" /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><line x1=\"2\" y1=\"4\" x2=\"237.99999999999997\" y2=\"4\" style=\"stroke:red;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"ReferenceLine3": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{}} /><SparklinesReferenceLine style={{stroke: 'red', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="mean" /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><line x1=\"2\" y1=\"30\" x2=\"237.99999999999997\" y2=\"30\" style=\"stroke:red;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"ReferenceLine4": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{}} /><SparklinesReferenceLine style={{stroke: 'red', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="avg" /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><line x1=\"2\" y1=\"35.502288607718995\" x2=\"237.99999999999997\" y2=\"35.502288607718995\" style=\"stroke:red;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"ReferenceLine5": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{}} /><SparklinesReferenceLine style={{stroke: 'red', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="median" /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:slategray;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><line x1=\"2\" y1=\"37.09328943580186\" x2=\"237.99999999999997\" y2=\"37.09328943580186\" style=\"stroke:red;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"ReferenceLine6": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesBars style={{fill: 'slategray', fillOpacity: '.5'}} /><SparklinesReferenceLine style={{stroke: 'red', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="mean" /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><rect x=\"2\" y=\"32\" width=\"9\" height=\"29\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"11\" y=\"56\" width=\"9\" height=\"5\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"19\" y=\"41\" width=\"9\" height=\"20\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"27\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"35\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"43\" y=\"23\" width=\"9\" height=\"38\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"51\" y=\"36\" width=\"9\" height=\"25\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"59\" y=\"35\" width=\"9\" height=\"26\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"68\" y=\"49\" width=\"9\" height=\"12\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"76\" y=\"56\" width=\"9\" height=\"5\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"84\" y=\"26\" width=\"9\" height=\"35\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"92\" y=\"50\" width=\"9\" height=\"11\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"100\" y=\"17\" width=\"9\" height=\"44\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"108\" y=\"58\" width=\"9\" height=\"2\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"116\" y=\"40\" width=\"9\" height=\"21\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"125\" y=\"37\" width=\"9\" height=\"24\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"133\" y=\"30\" width=\"9\" height=\"31\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"141\" y=\"2\" width=\"9\" height=\"58\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"149\" y=\"38\" width=\"9\" height=\"23\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"157\" y=\"24\" width=\"9\" height=\"37\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"165\" y=\"13\" width=\"9\" height=\"48\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"173\" y=\"23\" width=\"9\" height=\"38\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"182\" y=\"44\" width=\"9\" height=\"17\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"190\" y=\"20\" width=\"9\" height=\"41\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"198\" y=\"17\" width=\"9\" height=\"44\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"206\" y=\"33\" width=\"9\" height=\"28\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"214\" y=\"19\" width=\"9\" height=\"42\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"222\" y=\"46\" width=\"9\" height=\"15\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"230\" y=\"43\" width=\"9\" height=\"18\" style=\"fill:slategray;fill-opacity:.5;\"/><rect x=\"238\" y=\"39\" width=\"9\" height=\"22\" style=\"fill:slategray;fill-opacity:.5;\"/></g><line x1=\"2\" y1=\"30\" x2=\"237.99999999999997\" y2=\"30\" style=\"stroke:red;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"NormalBand1": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{fill: 'none'}} /><SparklinesNormalBand style={{fill: 'red', fillOpacity: 0.1}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><rect x=\"2\" y=\"15.537572257915796\" width=\"235.99999999999997\" height=\"28.924855484168408\" style=\"fill:red;fill-opacity:0.1;\"/></svg>"},
"NormalBand2": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{fill: 'none'}} /><SparklinesNormalBand style={{fill: 'red', fillOpacity: 0.1}} /><SparklinesReferenceLine style={{stroke: 'red', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="mean" /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:none;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:slategray;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><rect x=\"2\" y=\"15.537572257915796\" width=\"235.99999999999997\" height=\"28.924855484168408\" style=\"fill:red;fill-opacity:0.1;\"/><line x1=\"2\" y1=\"30\" x2=\"237.99999999999997\" y2=\"30\" style=\"stroke:red;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
"RealWorld1": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesLine style={{fill: 'none', stroke: '#336aff', strokeWidth: 3}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813 237.99999999999997 58 2 58 2 31.298818982032884\" style=\"stroke:#336aff;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 31.298818982032884 10.137931034482758 55.01316606917407 18.275862068965516 40.842536562733855 26.413793103448274 35.085712741670704 34.55172413793103 35.72307038050503 42.689655172413794 22.604754520014673 50.82758620689655 35.09328943580186 58.9655172413793 34.582746515903054 67.10344827586206 48.92380951913402 75.24137931034483 55.80094475531381 83.37931034482759 25.98640765234915 91.51724137931033 49.013602224527006 99.6551724137931 16.58949766232015 107.79310344827586 58 115.9310344827586 39.56937570955469 124.06896551724137 36.09976654235997 132.20689655172413 29.96269369456632 140.3448275862069 2 148.48275862068965 37.2279060531068 156.6206896551724 23.65320856797191 164.75862068965517 12.225428408536278 172.8965517241379 22.168883637468582 181.03448275862067 43.5834642299797 189.17241379310343 19.82660493315965 197.3103448275862 16.819343540796105 205.44827586206895 32.262281324484476 213.58620689655172 18.414088240128216 221.72413793103448 45.95308927627845 229.8620689655172 42.699930541317386 237.99999999999997 38.0442365103813\" style=\"stroke:#336aff;stroke-width:3;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"RealWorld2": {jsx: (<Sparklines data={sampleData100} height={60} margin={2} width={200}><SparklinesLine style={{fill: 'none', stroke: '#2991c8'}} /><SparklinesSpots size={2} spotColors={{'0': 'black', '1': 'green', '-1': 'red'}} /><SparklinesNormalBand style={{fill: '#2991c8', fillOpacity: 0.1}} /></Sparklines>), svg: "<svg width=\"200\" height=\"60\" viewbox=\"0 0 200 60\"><g><polyline points=\"2 28.699169913196723 3.97979797979798 18.746892936298458 5.95959595959596 19.360363549601256 7.9393939393939394 30.942358615790692 9.91919191919192 27.591132781250213 11.8989898989899 21.88244635727191 13.878787878787879 2.2716470413641217 15.85858585858586 44.111635466963286 17.83838383838384 3.2392984148533266 19.81818181818182 21.312565202895534 21.7979797979798 30.062400796861898 23.77777777777778 13.537375547655664 25.757575757575758 49.24484231527506 27.737373737373737 22.48858782535742 29.71717171717172 28.800973561581834 31.6969696969697 32.692831983598424 33.67676767676768 26.76323370600337 35.65656565656566 21.04742626901525 37.63636363636364 8.908148712918885 39.61616161616162 39.42307267642152 41.5959595959596 14.153400514054887 43.57575757575758 14.144702285039587 45.55555555555556 41.45470153711412 47.535353535353536 23.533189884931215 49.515151515151516 27.715293492970268 51.494949494949495 41.70513637186207 53.474747474747474 29.411721832122044 55.45454545454546 17.62358784089425 57.43434343434344 32.48390724607359 59.41414141414142 13.531005353390151 61.3939393939394 10.218042392856221 63.37373737373738 36.28660959742038 65.35353535353536 37.844453271865795 67.33333333333334 36.51503609547178 69.31313131313132 22.937682542519745 71.2929292929293 22.567381607926563 73.27272727272728 22.71411320154566 75.25252525252526 2 77.23232323232324 20.487621577906445 79.21212121212122 7.986210626656898 81.1919191919192 43.061937149131296 83.17171717171718 33.999085136323544 85.15151515151516 20.969016617883042 87.13131313131314 29.929990618273386 89.11111111111111 39.278543592155756 91.0909090909091 23.38805292163325 93.07070707070707 42.80252242249484 95.05050505050505 15.585534273942795 97.03030303030303 39.599323143860154 99.01010101010101 33.691745712013685 100.98989898989899 26.331575733579037 102.96969696969697 3.0228512208252734 104.94949494949495 23.016391232788045 106.92929292929293 24.865822463434533 108.90909090909092 32.67248342992299 110.8888888888889 34.670391141823934 112.86868686868688 40.14362702027685 114.84848484848486 4.679008029655258 116.82828282828284 28.723458308473166 118.80808080808082 10.158595469341476 120.7878787878788 26.825606281831906 122.76767676767678 52.94019819187331 124.74747474747475 17.95226440373869 126.72727272727273 5.9547382471651655 128.70707070707073 36.825105794528945 130.6868686868687 26.665000451223552 132.66666666666669 21.952951545240513 134.64646464646466 29.471548928099068 136.62626262626264 20.251832625499166 138.60606060606062 15.580978413243034 140.5858585858586 2.1212161788152923 142.56565656565658 9.851473603001866 144.54545454545456 28.580661894354176 146.52525252525254 18.76085629542151 148.50505050505052 32.15998920013431 150.4848484848485 36.65153413647405 152.46464646464648 22.161706059025654 154.44444444444446 32.441178872961345 156.42424242424244 46.89206470261126 158.40404040404042 17.61289853610026 160.3838383838384 28.33563388469292 162.36363636363637 26.82937553981752 164.34343434343435 13.798612100526448 166.32323232323233 14.49965939137122 168.3030303030303 32.701361828132725 170.2828282828283 23.704916621261074 172.26262626262627 23.96314088374288 174.24242424242425 33.25406896916259 176.22222222222223 18.639075909683598 178.2020202020202 29.37596848130279 180.1818181818182 26.516267657250477 182.16161616161617 29.865091114827834 184.14141414141415 40.58037071398917 186.12121212121212 17.433733829691164 188.1010101010101 57.99999999999999 190.08080808080808 40.78634337580227 192.06060606060606 26.50123154323286 194.04040404040404 19.80587881060026 196.02020202020202 50.520499511476984 198 2.5117288917517246 198 58 2 58 2 28.699169913196723\" style=\"stroke:#2991c8;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 28.699169913196723 3.97979797979798 18.746892936298458 5.95959595959596 19.360363549601256 7.9393939393939394 30.942358615790692 9.91919191919192 27.591132781250213 11.8989898989899 21.88244635727191 13.878787878787879 2.2716470413641217 15.85858585858586 44.111635466963286 17.83838383838384 3.2392984148533266 19.81818181818182 21.312565202895534 21.7979797979798 30.062400796861898 23.77777777777778 13.537375547655664 25.757575757575758 49.24484231527506 27.737373737373737 22.48858782535742 29.71717171717172 28.800973561581834 31.6969696969697 32.692831983598424 33.67676767676768 26.76323370600337 35.65656565656566 21.04742626901525 37.63636363636364 8.908148712918885 39.61616161616162 39.42307267642152 41.5959595959596 14.153400514054887 43.57575757575758 14.144702285039587 45.55555555555556 41.45470153711412 47.535353535353536 23.533189884931215 49.515151515151516 27.715293492970268 51.494949494949495 41.70513637186207 53.474747474747474 29.411721832122044 55.45454545454546 17.62358784089425 57.43434343434344 32.48390724607359 59.41414141414142 13.531005353390151 61.3939393939394 10.218042392856221 63.37373737373738 36.28660959742038 65.35353535353536 37.844453271865795 67.33333333333334 36.51503609547178 69.31313131313132 22.937682542519745 71.2929292929293 22.567381607926563 73.27272727272728 22.71411320154566 75.25252525252526 2 77.23232323232324 20.487621577906445 79.21212121212122 7.986210626656898 81.1919191919192 43.061937149131296 83.17171717171718 33.999085136323544 85.15151515151516 20.969016617883042 87.13131313131314 29.929990618273386 89.11111111111111 39.278543592155756 91.0909090909091 23.38805292163325 93.07070707070707 42.80252242249484 95.05050505050505 15.585534273942795 97.03030303030303 39.599323143860154 99.01010101010101 33.691745712013685 100.98989898989899 26.331575733579037 102.96969696969697 3.0228512208252734 104.94949494949495 23.016391232788045 106.92929292929293 24.865822463434533 108.90909090909092 32.67248342992299 110.8888888888889 34.670391141823934 112.86868686868688 40.14362702027685 114.84848484848486 4.679008029655258 116.82828282828284 28.723458308473166 118.80808080808082 10.158595469341476 120.7878787878788 26.825606281831906 122.76767676767678 52.94019819187331 124.74747474747475 17.95226440373869 126.72727272727273 5.9547382471651655 128.70707070707073 36.825105794528945 130.6868686868687 26.665000451223552 132.66666666666669 21.952951545240513 134.64646464646466 29.471548928099068 136.62626262626264 20.251832625499166 138.60606060606062 15.580978413243034 140.5858585858586 2.1212161788152923 142.56565656565658 9.851473603001866 144.54545454545456 28.580661894354176 146.52525252525254 18.76085629542151 148.50505050505052 32.15998920013431 150.4848484848485 36.65153413647405 152.46464646464648 22.161706059025654 154.44444444444446 32.441178872961345 156.42424242424244 46.89206470261126 158.40404040404042 17.61289853610026 160.3838383838384 28.33563388469292 162.36363636363637 26.82937553981752 164.34343434343435 13.798612100526448 166.32323232323233 14.49965939137122 168.3030303030303 32.701361828132725 170.2828282828283 23.704916621261074 172.26262626262627 23.96314088374288 174.24242424242425 33.25406896916259 176.22222222222223 18.639075909683598 178.2020202020202 29.37596848130279 180.1818181818182 26.516267657250477 182.16161616161617 29.865091114827834 184.14141414141415 40.58037071398917 186.12121212121212 17.433733829691164 188.1010101010101 57.99999999999999 190.08080808080808 40.78634337580227 192.06060606060606 26.50123154323286 194.04040404040404 19.80587881060026 196.02020202020202 50.520499511476984 198 2.5117288917517246\" style=\"stroke:#2991c8;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><g><circle cx=\"198\" cy=\"2.5117288917517246\" r=\"2\" style=\"fill:green;\"/></g><rect x=\"2\" y=\"17.737546692035906\" width=\"196\" height=\"24.52490661592818\" style=\"fill:#2991c8;fill-opacity:0.1;\"/></svg>"},
"RealWorld3": {jsx: (<Sparklines data={sampleData100} height={60} margin={2} width={240}><SparklinesLine style={{fill: 'none', stroke: 'black'}} /><SparklinesSpots size={2} spotColors={{'0': 'black', '1': 'green', '-1': 'red'}} style={{fill: 'orange'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><polyline points=\"2 28.699169913196723 4.383838383838384 18.746892936298458 6.767676767676767 19.360363549601256 9.15151515151515 30.942358615790692 11.535353535353535 27.591132781250213 13.919191919191919 21.88244635727191 16.3030303030303 2.2716470413641217 18.686868686868685 44.111635466963286 21.07070707070707 3.2392984148533266 23.454545454545453 21.312565202895534 25.838383838383837 30.062400796861898 28.22222222222222 13.537375547655664 30.606060606060602 49.24484231527506 32.98989898989899 22.48858782535742 35.37373737373737 28.800973561581834 37.75757575757576 32.692831983598424 40.14141414141414 26.76323370600337 42.52525252525252 21.04742626901525 44.90909090909091 8.908148712918885 47.29292929292929 39.42307267642152 49.676767676767675 14.153400514054887 52.060606060606055 14.144702285039587 54.44444444444444 41.45470153711412 56.82828282828282 23.533189884931215 59.212121212121204 27.715293492970268 61.59595959595959 41.70513637186207 63.97979797979797 29.411721832122044 66.36363636363636 17.62358784089425 68.74747474747474 32.48390724607359 71.13131313131312 13.531005353390151 73.51515151515152 10.218042392856221 75.8989898989899 36.28660959742038 78.28282828282828 37.844453271865795 80.66666666666666 36.51503609547178 83.05050505050504 22.937682542519745 85.43434343434343 22.567381607926563 87.81818181818181 22.71411320154566 90.2020202020202 2 92.58585858585857 20.487621577906445 94.96969696969697 7.986210626656898 97.35353535353535 43.061937149131296 99.73737373737373 33.999085136323544 102.12121212121211 20.969016617883042 104.50505050505049 29.929990618273386 106.88888888888889 39.278543592155756 109.27272727272727 23.38805292163325 111.65656565656565 42.80252242249484 114.04040404040403 15.585534273942795 116.42424242424241 39.599323143860154 118.8080808080808 33.691745712013685 121.19191919191918 26.331575733579037 123.57575757575756 3.0228512208252734 125.95959595959594 23.016391232788045 128.34343434343435 24.865822463434533 130.72727272727272 32.67248342992299 133.11111111111111 34.670391141823934 135.49494949494948 40.14362702027685 137.87878787878788 4.679008029655258 140.26262626262624 28.723458308473166 142.64646464646464 10.158595469341476 145.03030303030303 26.825606281831906 147.4141414141414 52.94019819187331 149.7979797979798 17.95226440373869 152.18181818181816 5.9547382471651655 154.56565656565655 36.825105794528945 156.94949494949495 26.665000451223552 159.33333333333331 21.952951545240513 161.7171717171717 29.471548928099068 164.10101010101008 20.251832625499166 166.48484848484847 15.580978413243034 168.86868686868686 2.1212161788152923 171.25252525252523 9.851473603001866 173.63636363636363 28.580661894354176 176.020202020202 18.76085629542151 178.4040404040404 32.15998920013431 180.78787878787878 36.65153413647405 183.17171717171715 22.161706059025654 185.55555555555554 32.441178872961345 187.93939393939394 46.89206470261126 190.3232323232323 17.61289853610026 192.7070707070707 28.33563388469292 195.09090909090907 26.82937553981752 197.47474747474746 13.798612100526448 199.85858585858585 14.49965939137122 202.24242424242422 32.701361828132725 204.62626262626262 23.704916621261074 207.01010101010098 23.96314088374288 209.39393939393938 33.25406896916259 211.77777777777777 18.639075909683598 214.16161616161614 29.37596848130279 216.54545454545453 26.516267657250477 218.9292929292929 29.865091114827834 221.3131313131313 40.58037071398917 223.6969696969697 17.433733829691164 226.08080808080805 57.99999999999999 228.46464646464645 40.78634337580227 230.84848484848482 26.50123154323286 233.2323232323232 19.80587881060026 235.6161616161616 50.520499511476984 237.99999999999997 2.5117288917517246 237.99999999999997 58 2 58 2 28.699169913196723\" style=\"stroke:black;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 28.699169913196723 4.383838383838384 18.746892936298458 6.767676767676767 19.360363549601256 9.15151515151515 30.942358615790692 11.535353535353535 27.591132781250213 13.919191919191919 21.88244635727191 16.3030303030303 2.2716470413641217 18.686868686868685 44.111635466963286 21.07070707070707 3.2392984148533266 23.454545454545453 21.312565202895534 25.838383838383837 30.062400796861898 28.22222222222222 13.537375547655664 30.606060606060602 49.24484231527506 32.98989898989899 22.48858782535742 35.37373737373737 28.800973561581834 37.75757575757576 32.692831983598424 40.14141414141414 26.76323370600337 42.52525252525252 21.04742626901525 44.90909090909091 8.908148712918885 47.29292929292929 39.42307267642152 49.676767676767675 14.153400514054887 52.060606060606055 14.144702285039587 54.44444444444444 41.45470153711412 56.82828282828282 23.533189884931215 59.212121212121204 27.715293492970268 61.59595959595959 41.70513637186207 63.97979797979797 29.411721832122044 66.36363636363636 17.62358784089425 68.74747474747474 32.48390724607359 71.13131313131312 13.531005353390151 73.51515151515152 10.218042392856221 75.8989898989899 36.28660959742038 78.28282828282828 37.844453271865795 80.66666666666666 36.51503609547178 83.05050505050504 22.937682542519745 85.43434343434343 22.567381607926563 87.81818181818181 22.71411320154566 90.2020202020202 2 92.58585858585857 20.487621577906445 94.96969696969697 7.986210626656898 97.35353535353535 43.061937149131296 99.73737373737373 33.999085136323544 102.12121212121211 20.969016617883042 104.50505050505049 29.929990618273386 106.88888888888889 39.278543592155756 109.27272727272727 23.38805292163325 111.65656565656565 42.80252242249484 114.04040404040403 15.585534273942795 116.42424242424241 39.599323143860154 118.8080808080808 33.691745712013685 121.19191919191918 26.331575733579037 123.57575757575756 3.0228512208252734 125.95959595959594 23.016391232788045 128.34343434343435 24.865822463434533 130.72727272727272 32.67248342992299 133.11111111111111 34.670391141823934 135.49494949494948 40.14362702027685 137.87878787878788 4.679008029655258 140.26262626262624 28.723458308473166 142.64646464646464 10.158595469341476 145.03030303030303 26.825606281831906 147.4141414141414 52.94019819187331 149.7979797979798 17.95226440373869 152.18181818181816 5.9547382471651655 154.56565656565655 36.825105794528945 156.94949494949495 26.665000451223552 159.33333333333331 21.952951545240513 161.7171717171717 29.471548928099068 164.10101010101008 20.251832625499166 166.48484848484847 15.580978413243034 168.86868686868686 2.1212161788152923 171.25252525252523 9.851473603001866 173.63636363636363 28.580661894354176 176.020202020202 18.76085629542151 178.4040404040404 32.15998920013431 180.78787878787878 36.65153413647405 183.17171717171715 22.161706059025654 185.55555555555554 32.441178872961345 187.93939393939394 46.89206470261126 190.3232323232323 17.61289853610026 192.7070707070707 28.33563388469292 195.09090909090907 26.82937553981752 197.47474747474746 13.798612100526448 199.85858585858585 14.49965939137122 202.24242424242422 32.701361828132725 204.62626262626262 23.704916621261074 207.01010101010098 23.96314088374288 209.39393939393938 33.25406896916259 211.77777777777777 18.639075909683598 214.16161616161614 29.37596848130279 216.54545454545453 26.516267657250477 218.9292929292929 29.865091114827834 221.3131313131313 40.58037071398917 223.6969696969697 17.433733829691164 226.08080808080805 57.99999999999999 228.46464646464645 40.78634337580227 230.84848484848482 26.50123154323286 233.2323232323232 19.80587881060026 235.6161616161616 50.520499511476984 237.99999999999997 2.5117288917517246\" style=\"stroke:black;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><g><circle cx=\"2\" cy=\"28.699169913196723\" r=\"2\" style=\"fill:orange;\"/><circle cx=\"237.99999999999997\" cy=\"2.5117288917517246\" r=\"2\" style=\"fill:orange;\"/></g></svg>"},
"RealWorld4": {jsx: (<Sparklines data={sampleData} height={60} margin={2} width={240}><SparklinesBars style={{fill: '#40c0f5', stroke: 'white', strokeWidth: '1'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"60\" viewbox=\"0 0 240 60\"><g><rect x=\"2\" y=\"32\" width=\"8\" height=\"29\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"10\" y=\"56\" width=\"8\" height=\"5\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"17\" y=\"41\" width=\"8\" height=\"20\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"24\" y=\"36\" width=\"8\" height=\"25\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"31\" y=\"36\" width=\"8\" height=\"25\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"38\" y=\"23\" width=\"8\" height=\"38\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"45\" y=\"36\" width=\"8\" height=\"25\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"52\" y=\"35\" width=\"8\" height=\"26\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"60\" y=\"49\" width=\"8\" height=\"12\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"67\" y=\"56\" width=\"8\" height=\"5\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"74\" y=\"26\" width=\"8\" height=\"35\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"81\" y=\"50\" width=\"8\" height=\"11\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"88\" y=\"17\" width=\"8\" height=\"44\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"95\" y=\"58\" width=\"8\" height=\"2\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"102\" y=\"40\" width=\"8\" height=\"21\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"110\" y=\"37\" width=\"8\" height=\"24\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"117\" y=\"30\" width=\"8\" height=\"31\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"124\" y=\"2\" width=\"8\" height=\"58\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"131\" y=\"38\" width=\"8\" height=\"23\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"138\" y=\"24\" width=\"8\" height=\"37\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"145\" y=\"13\" width=\"8\" height=\"48\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"152\" y=\"23\" width=\"8\" height=\"38\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"160\" y=\"44\" width=\"8\" height=\"17\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"167\" y=\"20\" width=\"8\" height=\"41\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"174\" y=\"17\" width=\"8\" height=\"44\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"181\" y=\"33\" width=\"8\" height=\"28\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"188\" y=\"19\" width=\"8\" height=\"42\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"195\" y=\"46\" width=\"8\" height=\"15\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"202\" y=\"43\" width=\"8\" height=\"18\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/><rect x=\"209\" y=\"39\" width=\"8\" height=\"22\" style=\"fill:#40c0f5;stroke:white;stroke-width:1;\"/></g></svg>"},
"RealWorld5": {jsx: (<Sparklines data={sampleData} height={80} margin={2} width={240}><SparklinesLine style={{fill: 'none', stroke: '#8ed53f', strokeWidth: '1'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"80\" viewbox=\"0 0 240 80\"><g><polyline points=\"2 41.762682904187486 10.137931034482758 73.94643966530765 18.275862068965516 54.71487104942451 26.413793103448274 46.90203872083881 34.55172413793103 47.76702408782825 42.689655172413794 29.96359542001991 50.82758620689655 46.912321377159664 58.9655172413793 46.219441700154135 67.10344827586206 65.68231291882473 75.24137931034483 75.01556788221158 83.37931034482759 34.55298181390241 91.51724137931033 65.80417444757236 99.6551724137931 21.800032541720196 107.79310344827586 78 115.9310344827586 52.9870098915385 124.06896551724137 48.27825459320281 132.20689655172413 39.94937001405429 140.3448275862069 2 148.48275862068965 49.80930107207351 156.6206896551724 31.38649734224759 164.75862068965517 15.877367125870661 172.8965517241379 29.372056365135933 181.03448275862067 58.43470145497244 189.17241379310343 26.193249552145236 197.3103448275862 22.111966233937565 205.44827586206895 43.07023894037178 213.58620689655172 24.27626261160258 221.72413793103448 61.650621160663604 229.8620689655172 57.2356200203593 237.99999999999997 50.91717812123176 237.99999999999997 78 2 78 2 41.762682904187486\" style=\"stroke:#8ed53f;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 41.762682904187486 10.137931034482758 73.94643966530765 18.275862068965516 54.71487104942451 26.413793103448274 46.90203872083881 34.55172413793103 47.76702408782825 42.689655172413794 29.96359542001991 50.82758620689655 46.912321377159664 58.9655172413793 46.219441700154135 67.10344827586206 65.68231291882473 75.24137931034483 75.01556788221158 83.37931034482759 34.55298181390241 91.51724137931033 65.80417444757236 99.6551724137931 21.800032541720196 107.79310344827586 78 115.9310344827586 52.9870098915385 124.06896551724137 48.27825459320281 132.20689655172413 39.94937001405429 140.3448275862069 2 148.48275862068965 49.80930107207351 156.6206896551724 31.38649734224759 164.75862068965517 15.877367125870661 172.8965517241379 29.372056365135933 181.03448275862067 58.43470145497244 189.17241379310343 26.193249552145236 197.3103448275862 22.111966233937565 205.44827586206895 43.07023894037178 213.58620689655172 24.27626261160258 221.72413793103448 61.650621160663604 229.8620689655172 57.2356200203593 237.99999999999997 50.91717812123176\" style=\"stroke:#8ed53f;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"RealWorld6": {jsx: (<Sparklines data={sampleData} height={80} margin={2} width={240}><SparklinesLine style={{fill: 'none', stroke: '#d1192e', strokeWidth: '1'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"80\" viewbox=\"0 0 240 80\"><g><polyline points=\"2 41.762682904187486 10.137931034482758 73.94643966530765 18.275862068965516 54.71487104942451 26.413793103448274 46.90203872083881 34.55172413793103 47.76702408782825 42.689655172413794 29.96359542001991 50.82758620689655 46.912321377159664 58.9655172413793 46.219441700154135 67.10344827586206 65.68231291882473 75.24137931034483 75.01556788221158 83.37931034482759 34.55298181390241 91.51724137931033 65.80417444757236 99.6551724137931 21.800032541720196 107.79310344827586 78 115.9310344827586 52.9870098915385 124.06896551724137 48.27825459320281 132.20689655172413 39.94937001405429 140.3448275862069 2 148.48275862068965 49.80930107207351 156.6206896551724 31.38649734224759 164.75862068965517 15.877367125870661 172.8965517241379 29.372056365135933 181.03448275862067 58.43470145497244 189.17241379310343 26.193249552145236 197.3103448275862 22.111966233937565 205.44827586206895 43.07023894037178 213.58620689655172 24.27626261160258 221.72413793103448 61.650621160663604 229.8620689655172 57.2356200203593 237.99999999999997 50.91717812123176 237.99999999999997 78 2 78 2 41.762682904187486\" style=\"stroke:#d1192e;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"2 41.762682904187486 10.137931034482758 73.94643966530765 18.275862068965516 54.71487104942451 26.413793103448274 46.90203872083881 34.55172413793103 47.76702408782825 42.689655172413794 29.96359542001991 50.82758620689655 46.912321377159664 58.9655172413793 46.219441700154135 67.10344827586206 65.68231291882473 75.24137931034483 75.01556788221158 83.37931034482759 34.55298181390241 91.51724137931033 65.80417444757236 99.6551724137931 21.800032541720196 107.79310344827586 78 115.9310344827586 52.9870098915385 124.06896551724137 48.27825459320281 132.20689655172413 39.94937001405429 140.3448275862069 2 148.48275862068965 49.80930107207351 156.6206896551724 31.38649734224759 164.75862068965517 15.877367125870661 172.8965517241379 29.372056365135933 181.03448275862067 58.43470145497244 189.17241379310343 26.193249552145236 197.3103448275862 22.111966233937565 205.44827586206895 43.07023894037178 213.58620689655172 24.27626261160258 221.72413793103448 61.650621160663604 229.8620689655172 57.2356200203593 237.99999999999997 50.91717812123176\" style=\"stroke:#d1192e;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"RealWorld7": {jsx: (<Sparklines data={sampleData} height={40} margin={2} width={240}><SparklinesLine style={{fill: '#8fc638', fillOpacity: '1', stroke: '#559500'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"40\" viewbox=\"0 0 240 40\"><g><polyline points=\"2 20.834955059878283 10.137931034482758 36.07989247304047 18.275862068965516 26.970202076043194 26.413793103448274 23.269386762502595 34.55172413793103 23.679116673181802 42.689655172413794 15.245913620009434 50.82758620689655 23.27425749444405 58.9655172413793 22.94605133165196 67.10344827586206 32.1653061194433 75.24137931034483 36.586321628416016 83.37931034482759 17.41983349079588 91.51724137931033 32.223030001481646 99.6551724137931 11.378962782920095 107.79310344827586 38 115.9310344827586 26.15174152757087 124.06896551724137 23.921278491517125 132.20689655172413 19.976017375078346 140.3448275862069 2 148.48275862068965 24.646511034140087 156.6206896551724 15.919919793696229 164.75862068965517 8.573489691201893 172.8965517241379 14.965710909801231 181.03448275862067 28.73222700498695 189.17241379310343 13.459960314174062 197.3103448275862 11.526720847654637 205.44827586206895 21.454323708597162 213.58620689655172 12.551913868653854 221.72413793103448 30.255557391893287 229.8620689655172 28.16424106227546 237.99999999999997 25.171294899530835 237.99999999999997 38 2 38 2 20.834955059878283\" style=\"stroke:#559500;stroke-width:0;fill-opacity:1;fill:#8fc638;\"/><polyline points=\"2 20.834955059878283 10.137931034482758 36.07989247304047 18.275862068965516 26.970202076043194 26.413793103448274 23.269386762502595 34.55172413793103 23.679116673181802 42.689655172413794 15.245913620009434 50.82758620689655 23.27425749444405 58.9655172413793 22.94605133165196 67.10344827586206 32.1653061194433 75.24137931034483 36.586321628416016 83.37931034482759 17.41983349079588 91.51724137931033 32.223030001481646 99.6551724137931 11.378962782920095 107.79310344827586 38 115.9310344827586 26.15174152757087 124.06896551724137 23.921278491517125 132.20689655172413 19.976017375078346 140.3448275862069 2 148.48275862068965 24.646511034140087 156.6206896551724 15.919919793696229 164.75862068965517 8.573489691201893 172.8965517241379 14.965710909801231 181.03448275862067 28.73222700498695 189.17241379310343 13.459960314174062 197.3103448275862 11.526720847654637 205.44827586206895 21.454323708597162 213.58620689655172 12.551913868653854 221.72413793103448 30.255557391893287 229.8620689655172 28.16424106227546 237.99999999999997 25.171294899530835\" style=\"stroke:#559500;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"RealWorld8": {jsx: (<Sparklines data={sampleData} height={40} margin={10} style={{background: '#272727'}} width={240}><SparklinesLine style={{fill: '#d2673a', fillOpacity: '.5', stroke: 'none'}} /></Sparklines>), svg: "<svg width=\"240\" height=\"40\" style=\"background:#272727;\" viewbox=\"0 0 240 40\"><g><polyline points=\"10 20.4638639221546 17.586206896551722 28.933273596133596 25.17241379310345 23.87233448669066 32.758620689655174 21.81632597916811 40.3448275862069 22.043953707323226 47.93103448275862 17.35884090000524 55.51724137931035 21.819031941357807 63.10344827586207 21.63669518425109 70.6896551724138 26.75850339969072 78.27586206896552 29.214623126897788 85.86206896551724 18.56657416155327 93.44827586206897 26.79057222304536 101.0344827586207 15.210534879400052 108.62068965517241 30 116.20689655172414 23.417634181983818 123.79310344827586 22.178488050842844 131.3793103448276 19.98667631948797 138.9655172413793 10 146.55172413793105 22.581395018966717 154.13793103448276 17.73328877427568 161.72413793103448 13.651938717334385 169.31034482758622 17.20317272766735 176.89655172413794 24.85123722499275 184.48275862068965 16.36664461898559 192.0689655172414 15.292622693141464 199.6551724137931 20.80795761588731 207.24137931034483 15.862174371474364 214.82758620689654 25.69753188438516 222.41379310344828 24.535689479041924 230 22.872941610850464 230 30 10 30 10 20.4638639221546\" style=\"stroke:none;stroke-width:0;fill-opacity:.5;fill:#d2673a;\"/><polyline points=\"10 20.4638639221546 17.586206896551722 28.933273596133596 25.17241379310345 23.87233448669066 32.758620689655174 21.81632597916811 40.3448275862069 22.043953707323226 47.93103448275862 17.35884090000524 55.51724137931035 21.819031941357807 63.10344827586207 21.63669518425109 70.6896551724138 26.75850339969072 78.27586206896552 29.214623126897788 85.86206896551724 18.56657416155327 93.44827586206897 26.79057222304536 101.0344827586207 15.210534879400052 108.62068965517241 30 116.20689655172414 23.417634181983818 123.79310344827586 22.178488050842844 131.3793103448276 19.98667631948797 138.9655172413793 10 146.55172413793105 22.581395018966717 154.13793103448276 17.73328877427568 161.72413793103448 13.651938717334385 169.31034482758622 17.20317272766735 176.89655172413794 24.85123722499275 184.48275862068965 16.36664461898559 192.0689655172414 15.292622693141464 199.6551724137931 20.80795761588731 207.24137931034483 15.862174371474364 214.82758620689654 25.69753188438516 222.41379310344828 24.535689479041924 230 22.872941610850464\" style=\"stroke:none;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g></svg>"},
"RealWorld9": {jsx: (<Sparklines data={sampleData} height={40} margin={10} style={{background: '#00bdcc'}} width={240}><SparklinesLine style={{fill: 'none', stroke: 'white'}} /><SparklinesReferenceLine style={{stroke: 'white', strokeDasharray: '2, 2', strokeOpacity: 0.75}} type="mean" /></Sparklines>), svg: "<svg width=\"240\" height=\"40\" style=\"background:#00bdcc;\" viewbox=\"0 0 240 40\"><g><polyline points=\"10 20.4638639221546 17.586206896551722 28.933273596133596 25.17241379310345 23.87233448669066 32.758620689655174 21.81632597916811 40.3448275862069 22.043953707323226 47.93103448275862 17.35884090000524 55.51724137931035 21.819031941357807 63.10344827586207 21.63669518425109 70.6896551724138 26.75850339969072 78.27586206896552 29.214623126897788 85.86206896551724 18.56657416155327 93.44827586206897 26.79057222304536 101.0344827586207 15.210534879400052 108.62068965517241 30 116.20689655172414 23.417634181983818 123.79310344827586 22.178488050842844 131.3793103448276 19.98667631948797 138.9655172413793 10 146.55172413793105 22.581395018966717 154.13793103448276 17.73328877427568 161.72413793103448 13.651938717334385 169.31034482758622 17.20317272766735 176.89655172413794 24.85123722499275 184.48275862068965 16.36664461898559 192.0689655172414 15.292622693141464 199.6551724137931 20.80795761588731 207.24137931034483 15.862174371474364 214.82758620689654 25.69753188438516 222.41379310344828 24.535689479041924 230 22.872941610850464 230 30 10 30 10 20.4638639221546\" style=\"stroke:white;stroke-width:0;fill-opacity:.1;fill:none;\"/><polyline points=\"10 20.4638639221546 17.586206896551722 28.933273596133596 25.17241379310345 23.87233448669066 32.758620689655174 21.81632597916811 40.3448275862069 22.043953707323226 47.93103448275862 17.35884090000524 55.51724137931035 21.819031941357807 63.10344827586207 21.63669518425109 70.6896551724138 26.75850339969072 78.27586206896552 29.214623126897788 85.86206896551724 18.56657416155327 93.44827586206897 26.79057222304536 101.0344827586207 15.210534879400052 108.62068965517241 30 116.20689655172414 23.417634181983818 123.79310344827586 22.178488050842844 131.3793103448276 19.98667631948797 138.9655172413793 10 146.55172413793105 22.581395018966717 154.13793103448276 17.73328877427568 161.72413793103448 13.651938717334385 169.31034482758622 17.20317272766735 176.89655172413794 24.85123722499275 184.48275862068965 16.36664461898559 192.0689655172414 15.292622693141464 199.6551724137931 20.80795761588731 207.24137931034483 15.862174371474364 214.82758620689654 25.69753188438516 222.41379310344828 24.535689479041924 230 22.872941610850464\" style=\"stroke:white;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:none;\"/></g><line x1=\"10\" y1=\"20\" x2=\"230\" y2=\"20\" style=\"stroke:white;stroke-dasharray:2, 2;stroke-opacity:0.75;\"/></svg>"},
// AUTO-GENERATED PART ENDS HERE
};
================================================
FILE: __tests__/graphical-tests.js
================================================
import fixtures from './fixtures';
import { render } from 'enzyme';
import { expect } from 'chai';
import compareSvg from './compareSvg';
describe.skip('Graphical tests from fixtures.js', function() {
for (let key of Object.keys(fixtures)) {
describe(`${key}`, function() {
it('should render as specified', function() {
const wrapper = render(fixtures[key].jsx);
const result = compareSvg(wrapper.html(), fixtures[key].svg);
const errorMessage = 'SVG output changed:\n' + result.changes.map(change => change.message).join('\n') + '\n';
expect(result.changes, errorMessage).to.be.empty;
});
});
}
});
================================================
FILE: __tests__/mean.js
================================================
import { expect } from 'chai';
import mean from '../src/dataProcessing/mean';
describe('mean', () => {
it('should return average of values', () => {
expect(mean([0])).to.eq(0)
expect(mean([0, 1])).to.eq(0.5)
expect(mean([1, 2])).to.eq(3/2)
expect(mean([0, 1, 2])).to.eq(1)
});
});
================================================
FILE: __tests__/median.js
================================================
import { expect } from 'chai';
import median from '../src/dataProcessing/median';
describe('median', () => {
it('should return median of values', () => {
expect(median([0])).to.eq(0)
expect(median([0, 1])).to.eq(1)
expect(median([1, 2, 3])).to.eq(2)
expect(median([5, 4, 3, 2, 1])).to.eq(3)
expect(median([2, 4, 1, 3, 5])).to.eq(3)
});
it('should calculate median by correctly sorting numbers, not lexicographically', () => {
expect(median([0, 20, 100])).to.eq(20)
expect(median([1, 3, 5, 7, 100, 1000, 10000])).to.eq(7)
});
it('should calculate median for real-world data', () => {
const data = [6161.719669666667,4995.179579999999,4040.0326529999998,3776.188567,2969.1544076666664,4701.473427,3128.7432525,3299.3572713333333,4272.681012,3422.561293333333,3462.3769910000005,4303.3568116666665,12118.759180333333,5272.167418666666,3130.953679666666,3830.7221036666665,4253.371313333333,6885.048253666668,4065.784471333334,4051.3181206666673,3312.486034666667,3519.332053333333,3578.4504983333336,3061.1413410000005,82353.92672433333,3166.496492,3962.746236333333,3355.8355669999996,3234.4706403333334,3319.0170516666667,3334.766027666667,7453.3247703333345,3356.1106466666665,7517.256305666666,6227.504952666667,2999.276804666666,3185.139871,2740.3619040000003,3554.696368,3908.206846,3055.0123826666663,3224.6066153333336,3576.984728,4848.392336666667,5388.439963000001,3662.7132256666664,6323.533573333332,3432.6356856666666,6223.385519666666,3137.5223516666665,4890.759132333333,3131.3128269999997,3814.362825333333,3452.1440953333336,2932.7764999999995,2816.087773333333,3989.263918666667,3113.313537,4504.276532333333,3561.8186296666663,3505.547739666667,4404.111484,4417.891140666666,4269.754091666667,3434.4542200000005,5476.430249666667,6312.4283306666675,5366.578057333334,3830.2674359999996,4812.407597333333,3376.3011166666674,3358.902772,6465.302481,3668.810244,2920.755890666667,4098.664499333333,3245.7028793333334,3443.5763826666666,3053.3344556666666,5223.266786,4993.329616000001,4095.5644090000005,3369.0089953333336,4341.683867,3377.744091666667,6399.325108333333,3453.0122806666664,2891.474329333333,4122.205589333334,4019.51985,3977.8773416666663,3615.6507353333336,4873.987182666668,3638.5405246666664,2889.41178];
expect(median(data)).to.eq(3668.810244)
})
});
================================================
FILE: __tests__/sampleData.js
================================================
export const sampleData = [
0.26789611283279424,
-1.5618808743590797,
-0.46848826820269196,
-0.02429709108986638,
-0.07347501430506465,
0.938722048681125,
-0.02488170176918398,
0.014511315562131895,
-1.0920317808493079,
-1.6226651458214956,
0.6777968350341455,
-1.0989601025670448,
1.402853678778828,
-1.7923422052616966,
-0.37025235972161835,
-0.10254054014867667,
0.3709902985604339,
2.5285657626539253,
-0.18958673659343403,
0.8578243085059141,
1.7395812075504404,
0.9723534409914075,
-0.6799757002898873,
1.153081489500828,
1.3851189843556257,
0.19355625368483506,
1.262069965103209,
-0.8628137671385424,
-0.6118030618030503,
-0.25257403618789087
];
export const sampleData100 = [
-0.2809926205121489,
0.5993223086924007,
0.5450586119753267,
-0.4794107823559421,
-0.18298272472350668,
0.3219712568468161,
2.0566174540438324,
-1.6442809970641576,
1.971025186834513,
0.37237930811331116,
-0.4015753275277232,
1.0601229819271032,
-2.0983317267366988,
0.26835584955818786,
-0.2899975217753408,
-0.6342464890422705,
-0.10975205424415876,
0.39583180670735013,
1.4695948548213784,
-1.2295606440627673,
1.0056333434310312,
1.006402733277956,
-1.4092655719724325,
0.17595701557726026,
-0.19396518917878047,
-1.4314174397644206,
-0.34402041741926476,
0.6986827111240516,
-0.6157663396302129,
1.0606864486721386,
1.3537300165741912,
-0.9521291296713654,
-1.089926042595364,
-0.9723342804049446,
0.2286317959508994,
0.2613862542298905,
0.24840731355644413,
2.08064561830636,
0.44534855831763426,
1.5511436162779393,
-1.5514313805901196,
-0.7497893094776009,
0.4027674242193654,
-0.38986316786208264,
-1.2167765233154504,
0.18879490542570268,
-1.5284852088503573,
0.8789559275619153,
-1.2451506359938267,
-0.7226040247250638,
-0.07157034383583998,
1.9901707247581082,
0.22166972734467405,
0.058080839429433054,
-0.6324465858010533,
-0.8091687560181702,
-1.293296284426419,
1.8436776591711028,
-0.28314101700652944,
1.358988312176975,
-0.1152691343859452,
-2.425199332455914,
0.6696100792204956,
1.7308347028588733,
-0.9997610678433961,
-0.10106296722138419,
0.3157348177184432,
-0.34931234065268996,
0.4662049447935582,
0.8793589099345607,
2.069923608446714,
1.3861543531394107,
-0.2705101572065443,
0.5980871990258989,
-0.5871146157743545,
-0.9844080263005216,
0.2972697252124295,
-0.6119868603373193,
-1.8902200290484288,
0.6996282188319667,
-0.24883654266800448,
-0.1156025389007573,
1.0370156630612894,
0.9750054921585302,
-0.635000984672242,
0.16076716404020402,
0.1379262931648021,
-0.6838899322825195,
0.6088591150304701,
-0.3408579041001186,
-0.08790701313160872,
-0.38412257182424137,
-1.3319278452946857,
0.7154759857504911,
-2.8727571205730915,
-1.3501468729225303,
-0.0865770144109483,
0.505651174224522,
-2.2111682240498753,
2.035381345199811
];
================================================
FILE: bootstrap-tests.js
================================================
// bootstrap-tests.js - A tool for updating the test cases in __tests__/fixtures.js
//
// 1) Reads __tests__/fixtures.js and looks for a "dynamic part", which should be a list of fields
// belonging to that file's default export, enclosed in a pair of markers (see "signal" constants
// below).
// 2) Imports the same fixtures file and (re-)renders each ReactElement to a static SVG string.
// 3) On success, overwrites __tests__/fixtures.js with an updated copy.
//
// Run with babel-node or using "npm run test:bootstrap".
import path from 'path';
import { render } from 'enzyme';
import LineByLineReader from 'line-by-line';
import reactElementToJsx from 'react-element-to-jsx-string';
import { writeFileSync } from 'fs';
import replaceAll from 'replaceall';
import React from 'react';
const fixturesFile = path.resolve(__dirname, './__tests__/fixtures.js');
const dynamicPartStartSignal = '// AUTO-GENERATED PART STARTS HERE';
const dynamicPartEndSignal = '// AUTO-GENERATED PART ENDS HERE';
const fixtures = require(fixturesFile).default;
// Handle recurring data constants
import { sampleData, sampleData100 } from './__tests__/data';
const recognizedDataConstants = {
sampleData, sampleData100
};
const recognizedDataStrings = {};
for (let dataKey of Object.keys(recognizedDataConstants)) {
recognizedDataStrings[dataKey] = markupToOneLine(reactElementToJsx(<div data-value={recognizedDataConstants[dataKey]} />)
.replace(/[^{]*\{|\}[^}]*/g, ''));
}
// Output control
let outData = '';
const write = content => { outData += content + '\n'; }
const save = () => writeFileSync(fixturesFile, outData);
function writeFixtures() {
for (let key of Object.keys(fixtures)) {
const jsx = fixtures[key].jsx;
const wrapper = render(jsx);
let jsxCode = `(${markupToOneLine(reactElementToJsx(jsx))})`;
const htmlCode = JSON.stringify(wrapper.html());
for (let dataKey of Object.keys(recognizedDataStrings)) {
jsxCode = replaceAll(recognizedDataStrings[dataKey], dataKey, jsxCode);
}
write(`\t${JSON.stringify(key)}: {jsx: ${jsxCode}, svg: ${htmlCode}},`);
}
}
function markupToOneLine(code) {
return code.replace(/\s*[\r\n]\s*/g, ' ').replace(/\s+/g, ' ').replace(/\s*([<>])\s*/g, '$1');
}
// Input control
const lr = new LineByLineReader(fixturesFile, {skipEmptyLines: false});
let inDynamicPart = false, dynamicPartCount = 0, lineCount = 0;
lr.on('line', line => {
++lineCount;
if (line === dynamicPartStartSignal) {
if (inDynamicPart)
throw new LineError('Dynamic part opened again');
++dynamicPartCount;
if (dynamicPartCount > 1)
throw new LineError('Multiple dynamic parts found');
inDynamicPart = true;
write(line);
try {
writeFixtures();
} catch(e) {
throw new LineError(e);
}
}
else if (line === dynamicPartEndSignal) {
if (!inDynamicPart)
throw new LineError('Dynamic part closed again');
inDynamicPart = false;
write(line);
}
else if (!inDynamicPart)
write(line);
});
lr.on('end', () => {
if (inDynamicPart) {
throw new LineError('Dynamic part not closed');
}
if (!dynamicPartCount) {
throw new LineError('No dynamic part found in file!');
}
save();
});
lr.on('error', function (err) {
throw new LineError(err);
});
class LineError extends Error {
constructor(message) {
super(`${fixturesFile}:${lineCount}: ${message}`);
}
}
================================================
FILE: build/index.js
================================================
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["ReactSparklines"] = factory(require("react"));
else
root["ReactSparklines"] = factory(root["React"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 31);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
if (process.env.NODE_ENV !== 'production') {
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
Symbol.for &&
Symbol.for('react.element')) ||
0xeac7;
var isValidElement = function(object) {
return typeof object === 'object' &&
object !== null &&
object.$$typeof === REACT_ELEMENT_TYPE;
};
// By explicitly using `prop-types` you are opting into new development behavior.
// http://fb.me/prop-types-in-prod
var throwOnDirectAccess = true;
module.exports = __webpack_require__(28)(isValidElement, throwOnDirectAccess);
} else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = __webpack_require__(27)();
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ }),
/* 1 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
/***/ }),
/* 2 */
/***/ (function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (data) {
return data.reduce(function (a, b) {
return a + b;
}) / data.length;
};
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (data) {
return Math.min.apply(Math, data);
};
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
function makeEmptyFunction(arg) {
return function () {
return arg;
};
}
/**
* This function accepts and discards inputs; it has no side effects. This is
* primarily useful idiomatically for overridable function endpoints which
* always need to be callable, since JS lacks a null-call idiom ala Cocoa.
*/
var emptyFunction = function emptyFunction() {};
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
return arg;
};
module.exports = emptyFunction;
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var validateFormat = function validateFormat(format) {};
if (process.env.NODE_ENV !== 'production') {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
};
}
function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);
if (!condition) {
var error;
if (format === undefined) {
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(format.replace(/%s/g, function () {
return args[argIndex++];
}));
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
}
module.exports = invariant;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (data) {
return Math.max.apply(Math, data);
};
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mean = __webpack_require__(3);
var _mean2 = _interopRequireDefault(_mean);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (data) {
var dataMean = (0, _mean2.default)(data);
var sqDiff = data.map(function (n) {
return Math.pow(n - dataMean, 2);
});
var avgSqDiff = (0, _mean2.default)(sqDiff);
return Math.sqrt(avgSqDiff);
};
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
var emptyFunction = __webpack_require__(6);
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var warning = emptyFunction;
if (process.env.NODE_ENV !== 'production') {
(function () {
var printWarning = function printWarning(format) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var argIndex = 0;
var message = 'Warning: ' + format.replace(/%s/g, function () {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
};
warning = function warning(condition, format) {
if (format === undefined) {
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
}
if (format.indexOf('Failed Composite propType: ') === 0) {
return; // Ignore CompositeComponent proptype check.
}
if (!condition) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
printWarning.apply(undefined, [format].concat(args));
}
};
})();
}
module.exports = warning;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(12);
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.SparklinesText = exports.SparklinesNormalBand = exports.SparklinesReferenceLine = exports.SparklinesSpots = exports.SparklinesBars = exports.SparklinesCurve = exports.SparklinesLine = exports.Sparklines = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _SparklinesText = __webpack_require__(19);
var _SparklinesText2 = _interopRequireDefault(_SparklinesText);
var _SparklinesLine = __webpack_require__(15);
var _SparklinesLine2 = _interopRequireDefault(_SparklinesLine);
var _SparklinesCurve = __webpack_require__(14);
var _SparklinesCurve2 = _interopRequireDefault(_SparklinesCurve);
var _SparklinesBars = __webpack_require__(13);
var _SparklinesBars2 = _interopRequireDefault(_SparklinesBars);
var _SparklinesSpots = __webpack_require__(18);
var _SparklinesSpots2 = _interopRequireDefault(_SparklinesSpots);
var _SparklinesReferenceLine = __webpack_require__(17);
var _SparklinesReferenceLine2 = _interopRequireDefault(_SparklinesReferenceLine);
var _SparklinesNormalBand = __webpack_require__(16);
var _SparklinesNormalBand2 = _interopRequireDefault(_SparklinesNormalBand);
var _dataToPoints = __webpack_require__(20);
var _dataToPoints2 = _interopRequireDefault(_dataToPoints);
var _reactAddonsShallowCompare = __webpack_require__(29);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Sparklines = function (_React$Component) {
_inherits(Sparklines, _React$Component);
function Sparklines(props) {
_classCallCheck(this, Sparklines);
return _possibleConstructorReturn(this, (Sparklines.__proto__ || Object.getPrototypeOf(Sparklines)).call(this, props));
}
_createClass(Sparklines, [{
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps) {
return (0, _reactAddonsShallowCompare2.default)(this, nextProps);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
data = _props.data,
limit = _props.limit,
width = _props.width,
height = _props.height,
svgWidth = _props.svgWidth,
svgHeight = _props.svgHeight,
preserveAspectRatio = _props.preserveAspectRatio,
margin = _props.margin,
style = _props.style,
max = _props.max,
min = _props.min;
if (data.length === 0) return null;
var points = (0, _dataToPoints2.default)({ data: data, limit: limit, width: width, height: height, margin: margin, max: max, min: min });
var svgOpts = { style: style, viewBox: '0 0 ' + width + ' ' + height, preserveAspectRatio: preserveAspectRatio };
if (svgWidth > 0) svgOpts.width = svgWidth;
if (svgHeight > 0) svgOpts.height = svgHeight;
return _react2.default.createElement(
'svg',
svgOpts,
_react2.default.Children.map(this.props.children, function (child) {
return _react2.default.cloneElement(child, { data: data, points: points, width: width, height: height, margin: margin });
})
);
}
}]);
return Sparklines;
}(_react2.default.Component);
Sparklines.propTypes = {
data: _propTypes2.default.array,
limit: _propTypes2.default.number,
width: _propTypes2.default.number,
height: _propTypes2.default.number,
svgWidth: _propTypes2.default.number,
svgHeight: _propTypes2.default.number,
preserveAspectRatio: _propTypes2.default.string,
margin: _propTypes2.default.number,
style: _propTypes2.default.object,
min: _propTypes2.default.number,
max: _propTypes2.default.number,
onMouseMove: _propTypes2.default.func
};
Sparklines.defaultProps = {
data: [],
width: 240,
height: 60,
//Scale the graphic content of the given element non-uniformly if necessary such that the element's bounding box exactly matches the viewport rectangle.
preserveAspectRatio: 'none', //https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute
margin: 2
};
exports.Sparklines = Sparklines;
exports.SparklinesLine = _SparklinesLine2.default;
exports.SparklinesCurve = _SparklinesCurve2.default;
exports.SparklinesBars = _SparklinesBars2.default;
exports.SparklinesSpots = _SparklinesSpots2.default;
exports.SparklinesReferenceLine = _SparklinesReferenceLine2.default;
exports.SparklinesNormalBand = _SparklinesNormalBand2.default;
exports.SparklinesText = _SparklinesText2.default;
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SparklinesBars = function (_React$Component) {
_inherits(SparklinesBars, _React$Component);
function SparklinesBars() {
_classCallCheck(this, SparklinesBars);
return _possibleConstructorReturn(this, (SparklinesBars.__proto__ || Object.getPrototypeOf(SparklinesBars)).apply(this, arguments));
}
_createClass(SparklinesBars, [{
key: 'render',
value: function render() {
var _this2 = this;
var _props = this.props,
points = _props.points,
height = _props.height,
style = _props.style,
barWidth = _props.barWidth,
onMouseMove = _props.onMouseMove;
var strokeWidth = 1 * (style && style.strokeWidth || 0);
var marginWidth = margin ? 2 * margin : 0;
var width = barWidth || (points && points.length >= 2 ? Math.max(0, points[1].x - points[0].x - strokeWidth - marginWidth) : 0);
return _react2.default.createElement(
'g',
{ transform: 'scale(1,-1)' },
points.map(function (p, i) {
return _react2.default.createElement('rect', {
key: i,
x: p.x - (width + strokeWidth) / 2,
y: -height,
width: width,
height: Math.max(0, height - p.y),
style: style,
onMouseMove: onMouseMove.bind(_this2, p) });
})
);
}
}]);
return SparklinesBars;
}(_react2.default.Component);
SparklinesBars.propTypes = {
points: _propTypes2.default.arrayOf(_propTypes2.default.object),
height: _propTypes2.default.number,
style: _propTypes2.default.object,
barWidth: _propTypes2.default.number,
margin: _propTypes2.default.number,
onMouseMove: _propTypes2.default.func
};
SparklinesBars.defaultProps = {
style: { fill: 'slategray' }
};
exports.default = SparklinesBars;
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SparklinesCurve = function (_React$Component) {
_inherits(SparklinesCurve, _React$Component);
function SparklinesCurve() {
_classCallCheck(this, SparklinesCurve);
return _possibleConstructorReturn(this, (SparklinesCurve.__proto__ || Object.getPrototypeOf(SparklinesCurve)).apply(this, arguments));
}
_createClass(SparklinesCurve, [{
key: 'render',
value: function render() {
var _props = this.props,
points = _props.points,
width = _props.width,
height = _props.height,
margin = _props.margin,
color = _props.color,
style = _props.style,
_props$divisor = _props.divisor,
divisor = _props$divisor === undefined ? 0.25 : _props$divisor;
var prev = void 0;
var curve = function curve(p) {
var res = void 0;
if (!prev) {
res = [p.x, p.y];
} else {
var len = (p.x - prev.x) * divisor;
res = ["C",
//x1
prev.x + len,
//y1
prev.y,
//x2,
p.x - len,
//y2,
p.y,
//x,
p.x,
//y
p.y];
}
prev = p;
return res;
};
var linePoints = points.map(function (p) {
return curve(p);
}).reduce(function (a, b) {
return a.concat(b);
});
var closePolyPoints = ["L" + points[points.length - 1].x, height - margin, margin, height - margin, margin, points[0].y];
var fillPoints = linePoints.concat(closePolyPoints);
var lineStyle = {
stroke: color || style.stroke || 'slategray',
strokeWidth: style.strokeWidth || '1',
strokeLinejoin: style.strokeLinejoin || 'round',
strokeLinecap: style.strokeLinecap || 'round',
fill: 'none'
};
var fillStyle = {
stroke: style.stroke || 'none',
strokeWidth: '0',
fillOpacity: style.fillOpacity || '.1',
fill: style.fill || color || 'slategray'
};
return _react2.default.createElement(
'g',
null,
_react2.default.createElement('path', { d: "M" + fillPoints.join(' '), style: fillStyle }),
_react2.default.createElement('path', { d: "M" + linePoints.join(' '), style: lineStyle })
);
}
}]);
return SparklinesCurve;
}(_react2.default.Component);
SparklinesCurve.propTypes = {
color: _propTypes2.default.string,
style: _propTypes2.default.object
};
SparklinesCurve.defaultProps = {
style: {}
};
exports.default = SparklinesCurve;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SparklinesLine = function (_React$Component) {
_inherits(SparklinesLine, _React$Component);
function SparklinesLine() {
_classCallCheck(this, SparklinesLine);
return _possibleConstructorReturn(this, (SparklinesLine.__proto__ || Object.getPrototypeOf(SparklinesLine)).apply(this, arguments));
}
_createClass(SparklinesLine, [{
key: 'render',
value: function render() {
var _props = this.props,
data = _props.data,
points = _props.points,
width = _props.width,
height = _props.height,
margin = _props.margin,
color = _props.color,
style = _props.style,
onMouseMove = _props.onMouseMove;
var linePoints = points.map(function (p) {
return [p.x, p.y];
}).reduce(function (a, b) {
return a.concat(b);
});
var closePolyPoints = [points[points.length - 1].x, height - margin, margin, height - margin, margin, points[0].y];
var fillPoints = linePoints.concat(closePolyPoints);
var lineStyle = {
stroke: color || style.stroke || 'slategray',
strokeWidth: style.strokeWidth || '1',
strokeLinejoin: style.strokeLinejoin || 'round',
strokeLinecap: style.strokeLinecap || 'round',
fill: 'none'
};
var fillStyle = {
stroke: style.stroke || 'none',
strokeWidth: '0',
fillOpacity: style.fillOpacity || '.1',
fill: style.fill || color || 'slategray',
pointerEvents: 'auto'
};
var tooltips = points.map(function (p, i) {
return _react2.default.createElement('circle', {
cx: p.x,
cy: p.y,
r: 2,
style: fillStyle,
onMouseEnter: function onMouseEnter(e) {
return onMouseMove('enter', data[i], p);
},
onClick: function onClick(e) {
return onMouseMove('click', data[i], p);
}
});
});
return _react2.default.createElement(
'g',
null,
tooltips,
_react2.default.createElement('polyline', { points: fillPoints.join(' '), style: fillStyle }),
_react2.default.createElement('polyline', { points: linePoints.join(' '), style: lineStyle })
);
}
}]);
return SparklinesLine;
}(_react2.default.Component);
SparklinesLine.propTypes = {
color: _propTypes2.default.string,
style: _propTypes2.default.object
};
SparklinesLine.defaultProps = {
style: {}
};
exports.default = SparklinesLine;
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _mean = __webpack_require__(3);
var _mean2 = _interopRequireDefault(_mean);
var _stdev = __webpack_require__(9);
var _stdev2 = _interopRequireDefault(_stdev);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SparklinesNormalBand = function (_React$Component) {
_inherits(SparklinesNormalBand, _React$Component);
function SparklinesNormalBand() {
_classCallCheck(this, SparklinesNormalBand);
return _possibleConstructorReturn(this, (SparklinesNormalBand.__proto__ || Object.getPrototypeOf(SparklinesNormalBand)).apply(this, arguments));
}
_createClass(SparklinesNormalBand, [{
key: 'render',
value: function render() {
var _props = this.props,
points = _props.points,
margin = _props.margin,
style = _props.style;
var ypoints = points.map(function (p) {
return p.y;
});
var dataMean = (0, _mean2.default)(ypoints);
var dataStdev = (0, _stdev2.default)(ypoints);
return _react2.default.createElement('rect', { x: points[0].x, y: dataMean - dataStdev + margin,
width: points[points.length - 1].x - points[0].x, height: _stdev2.default * 2,
style: style });
}
}]);
return SparklinesNormalBand;
}(_react2.default.Component);
SparklinesNormalBand.propTypes = {
style: _propTypes2.default.object
};
SparklinesNormalBand.defaultProps = {
style: { fill: 'red', fillOpacity: .1 }
};
exports.default = SparklinesNormalBand;
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
var _dataProcessing = __webpack_require__(21);
var dataProcessing = _interopRequireWildcard(_dataProcessing);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SparklinesReferenceLine = function (_React$Component) {
_inherits(SparklinesReferenceLine, _React$Component);
function SparklinesReferenceLine() {
_classCallCheck(this, SparklinesReferenceLine);
return _possibleConstructorReturn(this, (SparklinesReferenceLine.__proto__ || Object.getPrototypeOf(SparklinesReferenceLine)).apply(this, arguments));
}
_createClass(SparklinesReferenceLine, [{
key: 'render',
value: function render() {
var _props = this.props,
points = _props.points,
margin = _props.margin,
type = _props.type,
style = _props.style,
value = _props.value;
var ypoints = points.map(function (p) {
return p.y;
});
var y = type == 'custom' ? value : dataProcessing[type](ypoints);
return _react2.default.createElement('line', {
x1: points[0].x, y1: y + margin,
x2: points[points.length - 1].x, y2: y + margin,
style: style });
}
}]);
return SparklinesReferenceLine;
}(_react2.default.Component);
SparklinesReferenceLine.propTypes = {
type: _propTypes2.default.oneOf(['max', 'min', 'mean', 'avg', 'median', 'custom']),
value: _propTypes2.default.number,
style: _propTypes2.default.object
};
SparklinesReferenceLine.defaultProps = {
type: 'mean',
style: { stroke: 'red', strokeOpacity: .75, strokeDasharray: '2, 2' }
};
exports.default = SparklinesReferenceLine;
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SparklinesSpots = function (_React$Component) {
_inherits(SparklinesSpots, _React$Component);
function SparklinesSpots() {
_classCallCheck(this, SparklinesSpots);
return _possibleConstructorReturn(this, (SparklinesSpots.__proto__ || Object.getPrototypeOf(SparklinesSpots)).apply(this, arguments));
}
_createClass(SparklinesSpots, [{
key: 'lastDirection',
value: function lastDirection(points) {
Math.sign = Math.sign || function (x) {
return x > 0 ? 1 : -1;
};
return points.length < 2 ? 0 : Math.sign(points[points.length - 2].y - points[points.length - 1].y);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
points = _props.points,
width = _props.width,
height = _props.height,
size = _props.size,
style = _props.style,
spotColors = _props.spotColors;
var startSpot = _react2.default.createElement('circle', {
cx: points[0].x,
cy: points[0].y,
r: size,
style: style });
var endSpot = _react2.default.createElement('circle', {
cx: points[points.length - 1].x,
cy: points[points.length - 1].y,
r: size,
style: style || { fill: spotColors[this.lastDirection(points)] } });
return _react2.default.createElement(
'g',
null,
style && startSpot,
endSpot
);
}
}]);
return SparklinesSpots;
}(_react2.default.Component);
SparklinesSpots.propTypes = {
size: _propTypes2.default.number,
style: _propTypes2.default.object,
spotColors: _propTypes2.default.object
};
SparklinesSpots.defaultProps = {
size: 2,
spotColors: {
'-1': 'red',
'0': 'black',
'1': 'green'
}
};
exports.default = SparklinesSpots;
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = __webpack_require__(0);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var SparklinesText = function (_React$Component) {
_inherits(SparklinesText, _React$Component);
function SparklinesText() {
_classCallCheck(this, SparklinesText);
return _possibleConstructorReturn(this, (SparklinesText.__proto__ || Object.getPrototypeOf(SparklinesText)).apply(this, arguments));
}
_createClass(SparklinesText, [{
key: 'render',
value: function render() {
var _props = this.props,
point = _props.point,
text = _props.text,
fontSize = _props.fontSize,
fontFamily = _props.fontFamily;
var x = point.x,
y = point.y;
return _react2.default.createElement(
'g',
null,
_react2.default.createElement(
'text',
{ x: x, y: y, fontFamily: fontFamily || "Verdana", fontSize: fontSize || 10 },
text
)
);
}
}]);
return SparklinesText;
}(_react2.default.Component);
SparklinesText.propTypes = {
text: _propTypes2.default.string,
point: _propTypes2.default.object,
fontSize: _propTypes2.default.number,
fontFamily: _propTypes2.default.string
};
SparklinesText.defaultProps = {
text: '',
point: { x: 0, y: 0 }
};
exports.default = SparklinesText;
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _min = __webpack_require__(4);
var _min2 = _interopRequireDefault(_min);
var _max = __webpack_require__(8);
var _max2 = _interopRequireDefault(_max);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (_ref) {
var data = _ref.data,
limit = _ref.limit,
_ref$width = _ref.width,
width = _ref$width === undefined ? 1 : _ref$width,
_ref$height = _ref.height,
height = _ref$height === undefined ? 1 : _ref$height,
_ref$margin = _ref.margin,
margin = _ref$margin === undefined ? 0 : _ref$margin,
_ref$max = _ref.max,
max = _ref$max === undefined ? (0, _max2.default)(data) : _ref$max,
_ref$min = _ref.min,
min = _ref$min === undefined ? (0, _min2.default)(data) : _ref$min;
var len = data.length;
if (limit && limit < len) {
data = data.slice(len - limit);
}
var vfactor = (height - margin * 2) / (max - min || 2);
var hfactor = (width - margin * 2) / ((limit || len) - (len > 1 ? 1 : 0));
return data.map(function (d, i) {
return {
x: i * hfactor + margin,
y: (max === min ? 1 : max - d) * vfactor + margin
};
});
};
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.variance = exports.stdev = exports.median = exports.midRange = exports.avg = exports.mean = exports.max = exports.min = undefined;
var _min2 = __webpack_require__(4);
var _min3 = _interopRequireDefault(_min2);
var _mean2 = __webpack_require__(3);
var _mean3 = _interopRequireDefault(_mean2);
var _midRange2 = __webpack_require__(23);
var _midRange3 = _interopRequireDefault(_midRange2);
var _median2 = __webpack_require__(22);
var _median3 = _interopRequireDefault(_median2);
var _stdev2 = __webpack_require__(9);
var _stdev3 = _interopRequireDefault(_stdev2);
var _variance2 = __webpack_require__(24);
var _variance3 = _interopRequireDefault(_variance2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.min = _min3.default;
exports.max = _min3.default;
exports.mean = _mean3.default;
exports.avg = _mean3.default;
exports.midRange = _midRange3.default;
exports.median = _median3.default;
exports.stdev = _stdev3.default;
exports.variance = _variance3.default;
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (data) {
return data.sort(function (a, b) {
return a - b;
})[Math.floor(data.length / 2)];
};
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _min = __webpack_require__(4);
var _min2 = _interopRequireDefault(_min);
var _max = __webpack_require__(8);
var _max2 = _interopRequireDefault(_max);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (data) {
return (0, _max2.default)(data) - (0, _min2.default)(data) / 2;
};
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mean = __webpack_require__(3);
var _mean2 = _interopRequireDefault(_mean);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (data) {
var dataMean = (0, _mean2.default)(data);
var sq = data.map(function (n) {
return Math.pow(n - dataMean, 2);
});
return (0, _mean2.default)(sq);
};
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @typechecks
*
*/
/*eslint-disable no-self-compare */
var hasOwnProperty = Object.prototype.hasOwnProperty;
/**
* inlined Object.is polyfill to avoid requiring consumers ship their own
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
*/
function is(x, y) {
// SameValue algorithm
if (x === y) {
// Steps 1-5, 7-10
// Steps 6.b-6.e: +0 != -0
// Added the nonzero y check to make Flow happy, but it is redundant
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
// Step 6.a: NaN == NaN
return x !== x && y !== y;
}
}
/**
* Performs equality by iterating through keys on an object and returning false
* when any key has values which are not strictly equal between the arguments.
* Returns true when the values of all keys are strictly equal.
*/
function shallowEqual(objA, objB) {
if (is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
// Test for A's keys different from B.
for (var i = 0; i < keysA.length; i++) {
if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
return false;
}
}
return true;
}
module.exports = shallowEqual;
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
if (process.env.NODE_ENV !== 'production') {
var invariant = __webpack_require__(7);
var warning = __webpack_require__(10);
var ReactPropTypesSecret = __webpack_require__(5);
var loggedTypeFailures = {};
}
/**
* Assert that the values match with the type specs.
* Error messages are memorized and will only be shown once.
*
* @param {object} typeSpecs Map of name to a ReactPropType
* @param {object} values Runtime values that need to be type-checked
* @param {string} location e.g. "prop", "context", "child context"
* @param {string} componentName Name of the component for error messages.
* @param {?Function} getStack Returns the component stack.
* @private
*/
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
if (process.env.NODE_ENV !== 'production') {
for (var typeSpecName in typeSpecs) {
if (typeSpecs.hasOwnProperty(typeSpecName)) {
var error;
// Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error.message] = true;
var stack = getStack ? getStack() : '';
warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
}
}
}
}
}
module.exports = checkPropTypes;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var emptyFunction = __webpack_require__(6);
var invariant = __webpack_require__(7);
var ReactPropTypesSecret = __webpack_require__(5);
module.exports = function() {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
// It is still safe when called from React.
return;
}
invariant(
false,
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use PropTypes.checkPropTypes() to call them. ' +
'Read more at http://fb.me/use-check-prop-types'
);
};
shim.isRequired = shim;
function getShim() {
return shim;
};
// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
var ReactPropTypes = {
array: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim
};
ReactPropTypes.checkPropTypes = emptyFunction;
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
var emptyFunction = __webpack_require__(6);
var invariant = __webpack_require__(7);
var warning = __webpack_require__(10);
var ReactPropTypesSecret = __webpack_require__(5);
var checkPropTypes = __webpack_require__(26);
module.exports = function(isValidElement, throwOnDirectAccess) {
/* global Symbol */
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
/**
* Returns the iterator method function contained on the iterable object.
*
* Be sure to invoke the function with the iterable as context:
*
* var iteratorFn = getIteratorFn(myIterable);
* if (iteratorFn) {
* var iterator = iteratorFn.call(myIterable);
* ...
* }
*
* @param {?object} maybeIterable
* @return {?function}
*/
function getIteratorFn(maybeIterable) {
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
if (typeof iteratorFn === 'function') {
return iteratorFn;
}
}
/**
* Collection of methods that allow declaration and validation of props that are
* supplied to React components. Example usage:
*
* var Props = require('ReactPropTypes');
* var MyArticle = React.createClass({
* propTypes: {
* // An optional string prop named "description".
* description: Props.string,
*
* // A required enum prop named "category".
* category: Props.oneOf(['News','Photos']).isRequired,
*
* // A prop named "dialog" that requires an instance of Dialog.
* dialog: Props.instanceOf(Dialog).isRequired
* },
* render: function() { ... }
* });
*
* A more formal specification of how these methods are used:
*
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
* decl := ReactPropTypes.{type}(.isRequired)?
*
* Each and every declaration produces a function with the same signature. This
* allows the creation of custom validation functions. For example:
*
* var MyLink = React.createClass({
* propTypes: {
* // An optional string or URI prop named "href".
* href: function(props, propName, componentName) {
* var propValue = props[propName];
* if (propValue != null && typeof propValue !== 'string' &&
* !(propValue instanceof URI)) {
* return new Error(
* 'Expected a string or an URI for ' + propName + ' in ' +
* componentName
* );
* }
* }
* },
* render: function() {...}
* });
*
* @internal
*/
var ANONYMOUS = '<<anonymous>>';
// Important!
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
var ReactPropTypes = {
array: createPrimitiveTypeChecker('array'),
bool: createPrimitiveTypeChecker('boolean'),
func: createPrimitiveTypeChecker('function'),
number: createPrimitiveTypeChecker('number'),
object: createPrimitiveTypeChecker('object'),
string: createPrimitiveTypeChecker('string'),
symbol: createPrimitiveTypeChecker('symbol'),
any: createAnyTypeChecker(),
arrayOf: createArrayOfTypeChecker,
element: createElementTypeChecker(),
instanceOf: createInstanceTypeChecker,
node: createNodeChecker(),
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
};
/**
* inlined Object.is polyfill to avoid requiring consumers ship their own
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
*/
/*eslint-disable no-self-compare*/
function is(x, y) {
// SameValue algorithm
if (x === y) {
// Steps 1-5, 7-10
// Steps 6.b-6.e: +0 != -0
return x !== 0 || 1 / x === 1 / y;
} else {
// Step 6.a: NaN == NaN
return x !== x && y !== y;
}
}
/*eslint-enable no-self-compare*/
/**
* We use an Error-like object for backward compatibility as people may call
* PropTypes directly and inspect their output. However, we don't use real
* Errors anymore. We don't inspect their stack anyway, and creating them
* is prohibitively expensive if they are created too often, such as what
* happens in oneOfType() for any type before the one that matched.
*/
function PropTypeError(message) {
this.message = message;
this.stack = '';
}
// Make `instanceof Error` still work for returned errors.
PropTypeError.prototype = Error.prototype;
function createChainableTypeChecker(validate) {
if (process.env.NODE_ENV !== 'production') {
var manualPropTypeCallCache = {};
var manualPropTypeWarningCount = 0;
}
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
componentName = componentName || ANONYMOUS;
propFullName = propFullName || propName;
if (secret !== ReactPropTypesSecret) {
if (throwOnDirectAccess) {
// New behavior only for users of `prop-types` package
invariant(
false,
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use `PropTypes.checkPropTypes()` to call them. ' +
'Read more at http://fb.me/use-check-prop-types'
);
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
// Old behavior for people using React.PropTypes
var cacheKey = componentName + ':' + propName;
if (
!manualPropTypeCallCache[cacheKey] &&
// Avoid spamming the console because they are often not actionable except for lib authors
manualPropTypeWarningCount < 3
) {
warning(
false,
'You are manually calling a React.PropTypes validation ' +
'function for the `%s` prop on `%s`. This is deprecated ' +
'and will throw in the standalone `prop-types` package. ' +
'You may be seeing this warning due to a third-party PropTypes ' +
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
propFullName,
componentName
);
manualPropTypeCallCache[cacheKey] = true;
manualPropTypeWarningCount++;
}
}
}
if (props[propName] == null) {
if (isRequired) {
if (props[propName] === null) {
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
}
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
}
return null;
} else {
return validate(props, propName, componentName, location, propFullName);
}
}
var chainedCheckType = checkType.bind(null, false);
chainedCheckType.isRequired = checkType.bind(null, true);
return chainedCheckType;
}
function createPrimitiveTypeChecker(expectedType) {
function validate(props, propName, componentName, location, propFullName, secret) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== expectedType) {
// `propValue` being instance of, say, date/regexp, pass the 'object'
// check, but we can offer a more precise error message here rather than
// 'of type `object`'.
var preciseType = getPreciseType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createAnyTypeChecker() {
return createChainableTypeChecker(emptyFunction.thatReturnsNull);
}
function createArrayOfTypeChecker(typeChecker) {
function validate(props, propName, componentName, location, propFullName) {
if (typeof typeChecker !== 'function') {
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
}
var propValue = props[propName];
if (!Array.isArray(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
}
for (var i = 0; i < propValue.length; i++) {
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
if (error instanceof Error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function createElementTypeChecker() {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
if (!isValidElement(propValue)) {
var propType = getPropType(propValue);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
}
return null;
}
return createChainableTypeChecker(validate);
}
function createInstanceTypeChecker(expectedClass) {
function validate(props, propName, componentName, location, propFullName) {
if (!(props[propName] instanceof expectedClass)) {
var expectedClassName = expectedClass.name || ANONYMOUS;
var actualClassName = getClassName(props[propName]);
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected '
gitextract_9dwoz21r/ ├── .babelrc ├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE ├── README.md ├── __tests__/ │ ├── Sparklines.js │ ├── compareSvg.js │ ├── dataToPoints.js │ ├── fixtures.js │ ├── graphical-tests.js │ ├── mean.js │ ├── median.js │ └── sampleData.js ├── bootstrap-tests.js ├── build/ │ └── index.js ├── demo/ │ ├── demo.js │ ├── index.html │ └── webpack.config.js ├── index.js ├── package.json ├── src/ │ ├── Sparklines.js │ ├── SparklinesBars.js │ ├── SparklinesCurve.js │ ├── SparklinesLine.js │ ├── SparklinesNormalBand.js │ ├── SparklinesReferenceLine.js │ ├── SparklinesSpots.js │ ├── SparklinesText.js │ └── dataProcessing/ │ ├── dataToPoints.js │ ├── index.js │ ├── max.js │ ├── mean.js │ ├── median.js │ ├── midRange.js │ ├── min.js │ ├── stdev.js │ └── variance.js ├── wallaby.conf.js └── webpack.config.js
SYMBOL INDEX (131 symbols across 12 files)
FILE: __tests__/compareSvg.js
function normalizeStyle (line 3) | function normalizeStyle(style) {
function normalizeAttrs (line 9) | function normalizeAttrs(...$ns) {
function comparatorFn (line 16) | function comparatorFn($n1, $n2, childChanges) {
function compareSvg (line 21) | function compareSvg(svg1, svg2, options = {}) {
FILE: bootstrap-tests.js
function writeFixtures (line 40) | function writeFixtures() {
function markupToOneLine (line 52) | function markupToOneLine(code) {
class LineError (line 100) | class LineError extends Error {
method constructor (line 101) | constructor(message) {
FILE: build/index.js
function __webpack_require__ (line 16) | function __webpack_require__(moduleId) {
function defaultSetTimout (line 137) | function defaultSetTimout() {
function defaultClearTimeout (line 140) | function defaultClearTimeout () {
function runTimeout (line 163) | function runTimeout(fun) {
function runClearTimeout (line 188) | function runClearTimeout(marker) {
function cleanUpNextTick (line 220) | function cleanUpNextTick() {
function drainQueue (line 235) | function drainQueue() {
function Item (line 273) | function Item(fun, array) {
function noop (line 287) | function noop() {}
function makeEmptyFunction (line 379) | function makeEmptyFunction(arg) {
function invariant (line 443) | function invariant(condition, format, a, b, c, d, e, f) {
function _interopRequireDefault (line 497) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function defineProperties (line 602) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireDefault (line 648) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 650) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 652) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 654) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function Sparklines (line 659) | function Sparklines(props) {
function defineProperties (line 750) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireDefault (line 760) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 762) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 764) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 766) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function SparklinesBars (line 771) | function SparklinesBars() {
function defineProperties (line 837) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireDefault (line 847) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 849) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 851) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 853) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function SparklinesCurve (line 858) | function SparklinesCurve() {
function defineProperties (line 955) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireDefault (line 965) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 967) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 969) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 971) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function SparklinesLine (line 976) | function SparklinesLine() {
function defineProperties (line 1069) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireDefault (line 1087) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 1089) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 1091) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 1093) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function SparklinesNormalBand (line 1098) | function SparklinesNormalBand() {
function defineProperties (line 1147) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireWildcard (line 1161) | function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { ret...
function _interopRequireDefault (line 1163) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 1165) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 1167) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 1169) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function SparklinesReferenceLine (line 1174) | function SparklinesReferenceLine() {
function defineProperties (line 1228) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireDefault (line 1238) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 1240) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 1242) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 1244) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function SparklinesSpots (line 1249) | function SparklinesSpots() {
function defineProperties (line 1327) | function defineProperties(target, props) { for (var i = 0; i < props.len...
function _interopRequireDefault (line 1337) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _classCallCheck (line 1339) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function _possibleConstructorReturn (line 1341) | function _possibleConstructorReturn(self, call) { if (!self) { throw new...
function _inherits (line 1343) | function _inherits(subClass, superClass) { if (typeof superClass !== "fu...
function SparklinesText (line 1348) | function SparklinesText() {
function _interopRequireDefault (line 1411) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _interopRequireDefault (line 1481) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _interopRequireDefault (line 1528) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function _interopRequireDefault (line 1549) | function _interopRequireDefault(obj) { return obj && obj.__esModule ? ob...
function is (line 1586) | function is(x, y) {
function shallowEqual (line 1604) | function shallowEqual(objA, objB) {
function checkPropTypes (line 1666) | function checkPropTypes(typeSpecs, values, location, componentName, getS...
function shim (line 1722) | function shim(props, propName, componentName, location, propFullName, se...
function getShim (line 1735) | function getShim() {
function getIteratorFn (line 1809) | function getIteratorFn(maybeIterable) {
function is (line 1892) | function is(x, y) {
function PropTypeError (line 1912) | function PropTypeError(message) {
function createChainableTypeChecker (line 1919) | function createChainableTypeChecker(validate) {
function createPrimitiveTypeChecker (line 1979) | function createPrimitiveTypeChecker(expectedType) {
function createAnyTypeChecker (line 1996) | function createAnyTypeChecker() {
function createArrayOfTypeChecker (line 2000) | function createArrayOfTypeChecker(typeChecker) {
function createElementTypeChecker (line 2021) | function createElementTypeChecker() {
function createInstanceTypeChecker (line 2033) | function createInstanceTypeChecker(expectedClass) {
function createEnumTypeChecker (line 2045) | function createEnumTypeChecker(expectedValues) {
function createObjectOfTypeChecker (line 2065) | function createObjectOfTypeChecker(typeChecker) {
function createUnionTypeChecker (line 2088) | function createUnionTypeChecker(arrayOfTypeCheckers) {
function createNodeChecker (line 2121) | function createNodeChecker() {
function createShapeTypeChecker (line 2131) | function createShapeTypeChecker(shapeTypes) {
function isNode (line 2153) | function isNode(propValue) {
function isSymbol (line 2200) | function isSymbol(propType, propValue) {
function getPropType (line 2220) | function getPropType(propValue) {
function getPreciseType (line 2239) | function getPreciseType(propValue) {
function getPostfixForTypeWarning (line 2256) | function getPostfixForTypeWarning(value) {
function getClassName (line 2272) | function getClassName(propValue) {
function shallowCompare (line 2317) | function shallowCompare(instance, nextProps, nextState) {
FILE: demo/demo.js
function boxMullerRandom (line 5) | function boxMullerRandom () {
function randomData (line 26) | function randomData(n = 30) {
class Dynamic1 (line 113) | class Dynamic1 extends Component {
method constructor (line 115) | constructor(props) {
method render (line 124) | render() {
class Dynamic2 (line 134) | class Dynamic2 extends Component {
method constructor (line 136) | constructor(props) {
method render (line 145) | render() {
class Dynamic3 (line 156) | class Dynamic3 extends Component {
method constructor (line 158) | constructor(props) {
method render (line 167) | render() {
class Dynamic4 (line 177) | class Dynamic4 extends React.Component {
method constructor (line 179) | constructor(props) {
method render (line 188) | render() {
FILE: src/Sparklines.js
class Sparklines (line 12) | class Sparklines extends PureComponent {
method constructor (line 38) | constructor (props) {
method render (line 42) | render() {
FILE: src/SparklinesBars.js
class SparklinesBars (line 4) | class SparklinesBars extends React.Component {
method render (line 18) | render() {
FILE: src/SparklinesCurve.js
class SparklinesCurve (line 4) | class SparklinesCurve extends React.Component {
method render (line 15) | render() {
FILE: src/SparklinesLine.js
class SparklinesLine (line 4) | class SparklinesLine extends React.Component {
method render (line 15) | render() {
FILE: src/SparklinesNormalBand.js
class SparklinesNormalBand (line 6) | class SparklinesNormalBand extends React.Component {
method render (line 16) | render() {
FILE: src/SparklinesReferenceLine.js
class SparklinesReferenceLine (line 5) | class SparklinesReferenceLine extends React.Component {
method render (line 18) | render() {
FILE: src/SparklinesSpots.js
class SparklinesSpots (line 4) | class SparklinesSpots extends React.Component {
method lastDirection (line 21) | lastDirection(points) {
method render (line 30) | render() {
FILE: src/SparklinesText.js
class SparklinesText (line 4) | class SparklinesText extends React.Component {
method render (line 18) | render() {
Condensed preview — 40 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (257K chars).
[
{
"path": ".babelrc",
"chars": 154,
"preview": "{\n \"presets\": [\n \"react\",\n \"es2015\",\n \"stage-1\"\n ],\n \"plugins\": [\n \"transform-object-assign"
},
{
"path": ".gitignore",
"chars": 537,
"preview": "# Logs\nlogs\n*.log\n\n# Runtime data\npids\n*.pid\n*.seed\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nl"
},
{
"path": ".npmignore",
"chars": 34,
"preview": "node_modules\ndemo\nwallaby.conf.js\n"
},
{
"path": ".travis.yml",
"chars": 112,
"preview": "language: node_js\nbefore_install: npm install -g npm@3\nscript: travis_retry npm test\nnode_js:\n- '7'\nsudo: false\n"
},
{
"path": "LICENSE",
"chars": 1080,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Boris Yankov\n\nPermission is hereby granted, free of charge, to any person obta"
},
{
"path": "README.md",
"chars": 3077,
"preview": "# Beautiful and expressive sparklines component for React\n\n[ {\n\tstyle = (style || '').split(';').map(s => s.trim());\n\tstyle."
},
{
"path": "__tests__/dataToPoints.js",
"chars": 2331,
"preview": "import { expect } from 'chai';\nimport dataToPoints from '../src/dataProcessing/dataToPoints';\n\ndescribe('dataToPoints', "
},
{
"path": "__tests__/fixtures.js",
"chars": 106576,
"preview": "// This file is auto-updated by ../bootstrap-tests.js\n\nimport React from 'react';\nimport { Sparklines, SparklinesBars, S"
},
{
"path": "__tests__/graphical-tests.js",
"chars": 713,
"preview": "import fixtures from './fixtures';\nimport { render } from 'enzyme';\nimport { expect } from 'chai';\nimport compareSvg fro"
},
{
"path": "__tests__/mean.js",
"chars": 322,
"preview": "import { expect } from 'chai';\nimport mean from '../src/dataProcessing/mean';\n\ndescribe('mean', () => {\n it('should r"
},
{
"path": "__tests__/median.js",
"chars": 2384,
"preview": "import { expect } from 'chai';\nimport median from '../src/dataProcessing/median';\n\ndescribe('median', () => {\n it('sh"
},
{
"path": "__tests__/sampleData.js",
"chars": 3271,
"preview": "export const sampleData = [\n 0.26789611283279424,\n -1.5618808743590797,\n -0.46848826820269196,\n -0.024297091"
},
{
"path": "bootstrap-tests.js",
"chars": 3334,
"preview": "// bootstrap-tests.js - A tool for updating the test cases in __tests__/fixtures.js\n//\n// 1) Reads __tests__/fixtures.js"
},
{
"path": "build/index.js",
"chars": 82030,
"preview": "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object"
},
{
"path": "demo/demo.js",
"chars": 9685,
"preview": "import React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport { Sparklines, SparklinesBars, Sparkli"
},
{
"path": "demo/index.html",
"chars": 12548,
"preview": "<html>\n<head>\n <link href=\"https://fonts.googleapis.com/css?family=Roboto:400,300\" rel=\"stylesheet\">\n\n <style>\n\n "
},
{
"path": "demo/webpack.config.js",
"chars": 402,
"preview": "var path = require('path');\nvar webpack = require('webpack')\n\nmodule.exports = {\n cache: true,\n entry: './demo.js'"
},
{
"path": "index.js",
"chars": 49,
"preview": "module.exports = require('./src/Sparklines.js');\n"
},
{
"path": "package.json",
"chars": 1843,
"preview": "{\n \"name\": \"react-sparklines\",\n \"version\": \"1.7.0\",\n \"description\": \"Beautiful and expressive Sparklines component fo"
},
{
"path": "src/Sparklines.js",
"chars": 2404,
"preview": "import PropTypes from 'prop-types';\nimport React, { PureComponent} from 'react';\nimport SparklinesText from './Sparkline"
},
{
"path": "src/SparklinesBars.js",
"chars": 1196,
"preview": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport default class SparklinesBars extends React.Compon"
},
{
"path": "src/SparklinesCurve.js",
"chars": 2105,
"preview": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport default class SparklinesCurve extends React.Compo"
},
{
"path": "src/SparklinesLine.js",
"chars": 1703,
"preview": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport default class SparklinesLine extends React.Compon"
},
{
"path": "src/SparklinesNormalBand.js",
"chars": 793,
"preview": "import PropTypes from 'prop-types';\nimport React from 'react';\nimport mean from './dataProcessing/mean';\nimport stdev fr"
},
{
"path": "src/SparklinesReferenceLine.js",
"chars": 911,
"preview": "import PropTypes from 'prop-types';\nimport React from 'react';\nimport * as dataProcessing from './dataProcessing';\n\nexpo"
},
{
"path": "src/SparklinesSpots.js",
"chars": 1389,
"preview": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport default class SparklinesSpots extends React.Compo"
},
{
"path": "src/SparklinesText.js",
"chars": 702,
"preview": "import PropTypes from 'prop-types';\nimport React from 'react';\n\nexport default class SparklinesText extends React.Compon"
},
{
"path": "src/dataProcessing/dataToPoints.js",
"chars": 572,
"preview": "import arrayMin from './min';\nimport arrayMax from './max';\n\nexport default ({ data, limit, width = 1, height = 1, margi"
},
{
"path": "src/dataProcessing/index.js",
"chars": 233,
"preview": "export min from './min';\nexport max from './min';\nexport mean from './mean';\nexport avg from './mean';\nexport midRange f"
},
{
"path": "src/dataProcessing/max.js",
"chars": 55,
"preview": "export default data =>\n Math.max.apply(Math, data);\n"
},
{
"path": "src/dataProcessing/mean.js",
"chars": 71,
"preview": "export default data =>\n data.reduce((a, b) => a + b) / data.length;\n"
},
{
"path": "src/dataProcessing/median.js",
"chars": 83,
"preview": "export default data =>\n data.sort((a,b) => a - b)[Math.floor(data.length / 2)];\n"
},
{
"path": "src/dataProcessing/midRange.js",
"chars": 105,
"preview": "import min from './min';\nimport max from './max';\n\nexport default data =>\n max(data) - min(data) / 2;\n"
},
{
"path": "src/dataProcessing/min.js",
"chars": 55,
"preview": "export default data =>\n Math.min.apply(Math, data);\n"
},
{
"path": "src/dataProcessing/stdev.js",
"chars": 218,
"preview": "import mean from './mean';\n\nexport default data => {\n const dataMean = mean(data);\n const sqDiff = data.map(n => M"
},
{
"path": "src/dataProcessing/variance.js",
"chars": 165,
"preview": "import mean from './mean'\n\nexport default data => {\n const dataMean = mean(data);\n const sq = data.map(n => Math.p"
},
{
"path": "wallaby.conf.js",
"chars": 473,
"preview": "module.exports = function (wallaby) {\n return {\n files: ['src/*.js'],\n\n tests: ['__tests__/*.js'],\n\n "
},
{
"path": "webpack.config.js",
"chars": 664,
"preview": "var path = require('path');\nvar webpack = require('webpack')\n\nmodule.exports = {\n entry: {\n index: [\n "
}
]
About this extraction
This page contains the full source code of the borisyankov/react-sparklines GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 40 files (239.9 KB), approximately 81.0k tokens, and a symbol index with 131 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.