Commit f97c30ca authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

[Boxplot] Show selection

parent cba38901
...@@ -49,6 +49,13 @@ ...@@ -49,6 +49,13 @@
@mouseenter="showTooltip(label)" @mouseenter="showTooltip(label)"
@mouseleave="hideTooltip(label)" @mouseleave="hideTooltip(label)"
v-for="label in labels"> v-for="label in labels">
<rect class="fjs-select-rect"
:y="boxes[label].u_wsk"
:x="- boxplotWidth / 2 - 1"
:height="boxes[label].l_wsk - boxes[label].u_wsk"
:width="boxplotWidth + 4"
v-show="selectedLabel === label">
</rect>
<text text-anchor="middle" <text text-anchor="middle"
:transform="`translate(${boxplotWidth / 1.8},${boxes[label].median})rotate(90)`"> :transform="`translate(${boxplotWidth / 1.8},${boxes[label].median})rotate(90)`">
{{label}} {{label}}
...@@ -157,6 +164,7 @@ ...@@ -157,6 +164,7 @@
width: 0, width: 0,
height: 0, height: 0,
hasSetFilter: false, hasSetFilter: false,
selectedLabel: '',
tooltips: { tooltips: {
boxes: {} boxes: {}
}, },
...@@ -359,10 +367,12 @@ ...@@ -359,10 +367,12 @@
}, },
setIDFilter (label) { setIDFilter (label) {
store.dispatch('setFilter', {filter: 'ids', value: this.points[label].map(d => d.id)}) store.dispatch('setFilter', {filter: 'ids', value: this.points[label].map(d => d.id)})
this.selectedLabel = label
this.hasSetFilter = true this.hasSetFilter = true
}, },
resetFilter () { resetFilter () {
store.dispatch('setFilter', {filter: 'ids', value: []}) store.dispatch('setFilter', {filter: 'ids', value: []})
this.selectedLabel = ''
this.hasSetFilter = true this.hasSetFilter = true
}, },
drawPoints () { drawPoints () {
...@@ -425,6 +435,10 @@ ...@@ -425,6 +435,10 @@
svg svg
.fjs-box .fjs-box
cursor: pointer cursor: pointer
.fjs-select-rect
fill: none
stroke: red
stroke-width: 2px
.fjs-median, .fjs-lower-quartile, .fjs-upper-quartile .fjs-median, .fjs-lower-quartile, .fjs-upper-quartile
opacity: 1 opacity: 1
.fjs-lower-whisker, .fjs-upper-whisker, .fjs-antenna .fjs-lower-whisker, .fjs-upper-whisker, .fjs-antenna
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment