1
0
Fork 0

Fix SAC double top reversing

This commit is contained in:
Gregory Eremin 2015-03-16 16:24:13 +07:00
parent cab51ea128
commit 6a7c2c3b23
1 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ var StackedAreaChart = React.createClass({
}));
this.setState({
top: top.reverse(),
top: top,
weeks: weeks,
max: max,
state: 'newPoints'
@ -127,12 +127,12 @@ var StackedAreaChart = React.createClass({
render: function() {
var maxWidth = this.state.canvasWidth,
maxHeight = this.height,
rtop = this.state.top.reverse(),
top = this.state.top,
max = this.state.max;
var points = _.chain(this.state.weeks)
.map(function(items, week) {
var values = _.map(rtop, function(item) {
var values = _.map(top, function(item) {
return items[item] || 0;
});
@ -150,7 +150,7 @@ var StackedAreaChart = React.createClass({
.reverse()
.value();
var paths = _.map(rtop, function(item, i) {
var paths = _.map(top, function(item, i) {
var itemPoints = _.map(points, function(pair) {
return pair[1][i];
});