Refactored deployment mixins

This commit is contained in:
Jose Ivan Vargas 2017-07-28 12:24:12 -05:00
parent fdd1d59f60
commit d9a3c5f21c
2 changed files with 2 additions and 3 deletions

View file

@ -40,7 +40,6 @@
graphWidth: 600,
graphHeightOffset: 120,
margin: {},
breakpointHandler: Breakpoints.get(),
unitOfDisplay: '',
areaColorRgb: '#8fbce8',
lineColorRgb: '#1f78d1',

View file

@ -21,9 +21,9 @@ const mixins = {
formatDeployments() {
this.reducedDeploymentData = this.deploymentData.reduce((deploymentDataArray, deployment) => {
const time = new Date(deployment.created_at);
const xPos = Math.floor(this.xScale(time));
const xPos = Math.floor(this.timeSeries[0].timeSeriesScaleX(time));
time.setSeconds(this.data[0].time.getSeconds());
time.setSeconds(this.timeSeries[0].values[0].time.getSeconds());
if (xPos >= 0) {
deploymentDataArray.push({