diff --git a/src/App.vue b/src/App.vue
index 3bb8262..57af86b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,6 +4,7 @@
+
-
-
-
diff --git a/src/components/HistogramSlider.vue b/src/components/HistogramSlider.vue
index 6f5e049..01b4676 100644
--- a/src/components/HistogramSlider.vue
+++ b/src/components/HistogramSlider.vue
@@ -46,7 +46,7 @@ export default class HistogramSlider extends Vue {
diff --git a/src/js/range-slider.js b/src/js/range-slider.js
index 0dbd134..648539d 100644
--- a/src/js/range-slider.js
+++ b/src/js/range-slider.js
@@ -111,7 +111,7 @@ var jQuery = require('jquery')
'' +
'' +
'01' +
- '000' +
+ '000' +
'' +
''
diff --git a/src/store.ts b/src/store.ts
index 334ef67..92a6ac5 100644
--- a/src/store.ts
+++ b/src/store.ts
@@ -1,4 +1,5 @@
import { OpsData, fetchOpsData } from './classes/opsData'
+import { updateStats } from './classes/PopUpAndStats'
import { State } from './classes/state'
// Constant to expose and manage the store
@@ -8,13 +9,16 @@ export const store = {
state: new State(),
filterData (minDate: Date, maxDate: Date) {
+ this.state.minDate = new Date(minDate)
+ this.state.maxDate = new Date(maxDate)
this.state.timeFilteredData = []
for (const data of this.allData) {
- if ((minDate <= data.date) && (data.date <= maxDate)) {
+ if ((this.state.minDate <= data.date) && (data.date <= this.state.maxDate)) {
this.state.timeFilteredData.push(data)
}
}
this.updateMap()
+ this.updateStats()
},
async initStore () {
@@ -41,5 +45,9 @@ export const store = {
updateHistogramSlider () {
this.state.histogramSlider.updateHistogram(this.allData.map(d => d.date.getTime()), this)
+ },
+
+ updateStats () {
+ updateStats(this.state)
}
}