Skip to content

Commit

Permalink
Update charts
Browse files Browse the repository at this point in the history
  • Loading branch information
frievoe97 committed Mar 9, 2022
1 parent 2c70ee8 commit cc1a822
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 12 deletions.
6 changes: 5 additions & 1 deletion src/charts/bubble.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export default class VueComponent extends Vue {
else this.updateChartSimple()
} catch (e) {
const msg = '' + e
this.$store.commit('setStatus', { type: Status.ERROR, msg })
this.$store.commit('setStatus', {
type: Status.ERROR,
msg,
desc: 'Add a desription...',
})
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/charts/heatmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { transpose } from 'mathjs'
import VuePlotly from '@/components/VuePlotly.vue'
import DashboardDataManager from '@/js/DashboardDataManager'
import { DataTable, FileSystemConfig, UI_FONT } from '@/Globals'
import { DataTable, FileSystemConfig, UI_FONT, Status } from '@/Globals'
import globalStore from '@/store'
import { buildCleanTitle } from '@/charts/allCharts'
Expand Down Expand Up @@ -95,7 +95,11 @@ export default class VueComponent extends Vue {
else this.updateChartSimple()
} catch (e) {
const msg = '' + e
this.$store.commit('error', msg)
this.$store.commit('setStatus', {
type: Status.ERROR,
msg,
desc: 'Add a desription...',
})
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/charts/line.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ export default class VueComponent extends Vue {
else this.updateChartSimple()
} catch (e) {
const msg = '' + e
this.$store.commit('setStatus', { type: Status.ERROR, msg })
this.$store.commit('setStatus', {
type: Status.ERROR,
msg,
desc: 'Add a desription...',
})
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/charts/pie.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ export default class VueComponent extends Vue {
else this.updateChartSimple()
} catch (e) {
const msg = '' + e
this.$store.commit('setStatus', { type: Status.ERROR, msg })
this.$store.commit('setStatus', {
type: Status.ERROR,
msg,
desc: 'Add a desription...',
})
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/charts/scatter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ export default class VueComponent extends Vue {
else this.updateChartSimple()
} catch (e) {
const msg = '' + e
this.$store.commit('setStatus', { type: Status.ERROR, msg })
this.$store.commit('setStatus', {
type: Status.ERROR,
msg,
desc: 'Add a desription...',
})
}
}
Expand Down
15 changes: 9 additions & 6 deletions src/plugins/xy-hexagons/XyHexagons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,9 @@ class XyHexagons extends Vue {
this.$store.commit('requestLogin', this.myState.fileSystem.slug)
} else {
this.$store.commit('setStatus', {
type: Status.WARNING,
msg: `Could not find: ${this.myState.subfolder}/${this.myState.yamlConfig}`,
type: Status.ERROR,
msg: `File not found`,
desc: 'Could not find: ${this.myState.subfolder}/${this.myState.yamlConfig}',
})
}
}
Expand Down Expand Up @@ -488,7 +489,7 @@ class XyHexagons extends Vue {
private handleShowSelectionButton() {
const arrays = Object.values(this.multiSelectedHexagons)
let points: any[] = []
arrays.map((a) => (points = points.concat(a)))
arrays.map(a => (points = points.concat(a)))
const pickedObject = { object: { points } }
this.flipViewToShowInvertedData(pickedObject)
Expand All @@ -505,7 +506,7 @@ class XyHexagons extends Vue {
numHexagons: number
selectedHexagonIds: any[]
} | null {
const selectedHexes = Object.keys(this.multiSelectedHexagons).map((a) => parseInt(a))
const selectedHexes = Object.keys(this.multiSelectedHexagons).map(a => parseInt(a))
if (!selectedHexes.length) return null
const arrays = Object.values(this.multiSelectedHexagons)
Expand Down Expand Up @@ -610,7 +611,8 @@ class XyHexagons extends Vue {
this.myState.statusMessage = buffer.data.error
this.$store.commit('setStatus', {
type: Status.ERROR,
msg: `Error loading: ${this.myState.subfolder}/${this.vizDetails.file}`,
msg: `Loading Error`,
desc: 'Error loading: ${this.myState.subfolder}/${this.vizDetails.file}',
})
} else {
const { rowCache, columnLookup } = buffer.data
Expand Down Expand Up @@ -648,7 +650,8 @@ class XyHexagons extends Vue {
this.myState.statusMessage = '' + e
this.$store.commit('setStatus', {
type: Status.ERROR,
msg: `Error loading/parsing: ${this.myState.subfolder}/${this.vizDetails.file}`,
msg: `Loading/Parsing Error`,
desc: 'Error loading/parsing: ${this.myState.subfolder}/${this.vizDetails.file}',
})
}
}
Expand Down

0 comments on commit cc1a822

Please sign in to comment.