|
|
@ -938,7 +938,7 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
this.series |
|
|
|
this.series |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.LEFT)) |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.LEFT)) |
|
|
|
.map( |
|
|
|
.map( |
|
|
|
serie => minBy<number[]>(serie.datapoints, dp => dp[0])[0] |
|
|
|
serie => minBy<number[]>(serie.datapoints, dp => dp[1])[1] |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
return minValue; |
|
|
|
return minValue; |
|
|
@ -956,7 +956,7 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
this.series |
|
|
|
this.series |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.LEFT)) |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.LEFT)) |
|
|
|
.map( |
|
|
|
.map( |
|
|
|
serie => maxBy<number[]>(serie.datapoints, dp => dp[0])[0] |
|
|
|
serie => maxBy<number[]>(serie.datapoints, dp => dp[1])[1] |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
return maxValue; |
|
|
|
return maxValue; |
|
|
@ -974,7 +974,7 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
this.series |
|
|
|
this.series |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.RIGHT)) |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.RIGHT)) |
|
|
|
.map( |
|
|
|
.map( |
|
|
|
serie => minBy<number[]>(serie.datapoints, dp => dp[0])[0] |
|
|
|
serie => minBy<number[]>(serie.datapoints, dp => dp[1])[1] |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
return minValue; |
|
|
|
return minValue; |
|
|
@ -991,7 +991,7 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
this.series |
|
|
|
this.series |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.RIGHT)) |
|
|
|
.filter(serie => serie.visible !== false && this.filterSerieByYAxisOrientation(serie, yAxisOrientation.RIGHT)) |
|
|
|
.map( |
|
|
|
.map( |
|
|
|
serie => maxBy<number[]>(serie.datapoints, dp => dp[0])[0] |
|
|
|
serie => maxBy<number[]>(serie.datapoints, dp => dp[1])[1] |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
return maxValue; |
|
|
|
return maxValue; |
|
|
@ -1009,7 +1009,7 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
this.series |
|
|
|
this.series |
|
|
|
.filter(serie => serie.visible !== false) |
|
|
|
.filter(serie => serie.visible !== false) |
|
|
|
.map( |
|
|
|
.map( |
|
|
|
serie => minBy<number[]>(serie.datapoints, dp => dp[1])[1] |
|
|
|
serie => minBy<number[]>(serie.datapoints, dp => dp[0])[0] |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
return minValue; |
|
|
|
return minValue; |
|
|
@ -1026,7 +1026,7 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
this.series |
|
|
|
this.series |
|
|
|
.filter(serie => serie.visible !== false) |
|
|
|
.filter(serie => serie.visible !== false) |
|
|
|
.map( |
|
|
|
.map( |
|
|
|
serie => maxBy<number[]>(serie.datapoints, dp => dp[1])[1] |
|
|
|
serie => maxBy<number[]>(serie.datapoints, dp => dp[0])[0] |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
return maxValue; |
|
|
|
return maxValue; |
|
|
@ -1058,8 +1058,8 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
if(this.series.length === 0) { |
|
|
|
if(this.series.length === 0) { |
|
|
|
return undefined; |
|
|
|
return undefined; |
|
|
|
} |
|
|
|
} |
|
|
|
const startTimestamp = first(this.series[0].datapoints)[1]; |
|
|
|
const startTimestamp = first(this.series[0].datapoints)[0]; |
|
|
|
const endTimestamp = last(this.series[0].datapoints)[1]; |
|
|
|
const endTimestamp = last(this.series[0].datapoints)[0]; |
|
|
|
return (endTimestamp - startTimestamp) / 1000; |
|
|
|
return (endTimestamp - startTimestamp) / 1000; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1095,7 +1095,7 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> { |
|
|
|
|
|
|
|
|
|
|
|
get timeInterval(): number { |
|
|
|
get timeInterval(): number { |
|
|
|
if(this.series !== undefined && this.series.length > 0 && this.series[0].datapoints.length > 1) { |
|
|
|
if(this.series !== undefined && this.series.length > 0 && this.series[0].datapoints.length > 1) { |
|
|
|
const interval = this.series[0].datapoints[1][1] - this.series[0].datapoints[0][1]; |
|
|
|
const interval = this.series[0].datapoints[1][0] - this.series[0].datapoints[0][0]; |
|
|
|
return interval; |
|
|
|
return interval; |
|
|
|
} |
|
|
|
} |
|
|
|
if(this.options.timeInterval !== undefined && this.options.timeInterval.count !== undefined) { |
|
|
|
if(this.options.timeInterval !== undefined && this.options.timeInterval.count !== undefined) { |
|
|
|