diff --git a/lib/www/client/source/src/components/graph-guns-pressure.vue b/lib/www/client/source/src/components/graph-guns-pressure.vue index 1f52d86..63d56cd 100644 --- a/lib/www/client/source/src/components/graph-guns-pressure.vue +++ b/lib/www/client/source/src/components/graph-guns-pressure.vue @@ -50,7 +50,7 @@ import * as aes from '@/lib/graphs/aesthetics.js'; export default { name: 'DougalGraphGunsPressure', - props: [ "data" ], + props: [ "data", "settings" ], data () { return { @@ -80,10 +80,24 @@ export default { } }, + settings () { + for (const key in this.settings) { + this[key] = this.settings[key]; + } + }, + + shotpoint () { + if (this.shotpoint) { + this.replot(); + } + this.$emit("update:settings", {[`${this.$options.name}.shotpoint`]: this.shotpoint}); + }, + violinplot () { if (this.violinplot) { this.plotViolin(); } + this.$emit("update:settings", {[`${this.$options.name}.violinplot`]: this.violinplot}); } },