Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #44 from unchartedsoftware/multi-vertical-timeseries
Browse files Browse the repository at this point in the history
Multiple vertical timeseries
  • Loading branch information
kbirk committed Jul 17, 2019
2 parents d1c8cdc + ae74ea2 commit 10d301c
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 77 deletions.
18 changes: 16 additions & 2 deletions examples/timeseries-vertical/timeseries.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ function main() {
icon: {class: 'fa fa-male', color: 'green'},
count: 28,
value: 'Linda',
timeseries : [[0,4],[1,2],[2,0],[3,4],[4,2],[5,0],[6,8],[7,8],[8,0],[9,0],[10,0]]
multipleTimeseries : [
[[0,4],[1,2],[2,0],[3,4],[4,2],[5,0],[6,8],[7,8],[8,0],[9,0],[10,0]],
[[0,0],[2,8],[3,0],[6,4],[7,2],[8,2],[12,8],[14,0],[18,0],[19,0],[22,0]]
],
colors: [
'green',
'#3B5998',
]
},
{
icon: {class: 'fa fa-male', color: 'blue'},
Expand All @@ -50,7 +57,14 @@ function main() {
icon: {class: 'fa fa-male', color: 'goldenrod'},
count: 6,
value: 'Maya',
timeseries : [0,0,0,4,2,0,0,0,0,0,0]
multipleTimeseries : [
[0,0,0,4,2,0,0,0,0,0,0],
[0,0,1,2,0,3,0,0,0,4,1]
],
colors: [
'goldenrod',
'#3CBA54',
]
},
{
icon: {class: 'fa fa-male', color: 'magenta'},
Expand Down
43 changes: 31 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Facets Component developed by Uncharted Software",
"repository": "https://github.com/unchartedsoftware/stories-facets",
"license": "Apache-2.0",
"version": "2.12.15",
"version": "2.12.16",
"devDependencies": {
"body-parser": "~1.18.3",
"browserify": "^16.2.3",
Expand Down
8 changes: 0 additions & 8 deletions src/components/facet/facetSparkline.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,6 @@ FacetSparkline.prototype.initializeTimeseries = function(svg, sparkline, hasMult
return a.x - b.x;
});

// sparkline.forEach(function(subseries, index) {
// var totalSparklinePath = that._renderSparkline(this._sparkWidth, sparkHeight, subseries, that._maxY, index);
// totalSparklinePath.appendTo(that._svg);
// });

} else {
// single sparkline

Expand Down Expand Up @@ -211,9 +206,6 @@ FacetSparkline.prototype.initializeTimeseries = function(svg, sparkline, hasMult

}
this._sparklineLength = sparkline.length;

// var totalSparklinePath = this._renderSparkline(this._sparkWidth, sparkHeight, sparkline, this._maxY, 0);
// totalSparklinePath.appendTo(this._svg);
}

this._lineWidth = this._sparkWidth / this._sparklineLength;
Expand Down
Loading

0 comments on commit 10d301c

Please sign in to comment.