diff --git a/vue-definitions.js b/vue-definitions.js index 8e80f57..74253b5 100644 --- a/vue-definitions.js +++ b/vue-definitions.js @@ -27,21 +27,17 @@ Vue.component('graph', { this.traceIndices = this.graphData.traces.map((e, i) => e.name == name ? i : -1).filter(e => e >= 0); let update = {'line': {color: 'rgba(254, 52, 110, 1)'}}; - for (let i of this.traceIndices) { - Plotly.restyle(this.$refs.graph, update, [i]); - } + Plotly.restyle(this.$refs.graph, update, this.traceIndices); } }, - onHoverOff() { + onHoverOff(_) { let update = {'line': {color: 'rgba(0,0,0,0.15)'}}; - for (let i of this.traceIndices) { - Plotly.restyle(this.$refs.graph, update, [i]); - } - + Plotly.restyle(this.$refs.graph, update, this.traceIndices); + }, onLayoutChange(data) {