Commit 2685b85e authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

moved fieldset style to base.sass

parent 4df5aa0d
...@@ -14,4 +14,13 @@ ...@@ -14,4 +14,13 @@
.fjs-seperator .fjs-seperator
width: 100% width: 100%
margin: 20px 0 20px 0 margin: 20px 0 20px 0
\ No newline at end of file
.fjs-fieldset
display: flex
flex-direction: row
flex-wrap: nowrap
justify-content: flex-start
margin: 0.4vh 0 0.4vh 0
border: solid 1px #fff
padding: 0.4vw
\ No newline at end of file
<template> <template>
<chart v-on:resize="resize"> <chart v-on:resize="resize">
<control-panel class="fjs-control-panel" name="Correlation Analysis"> <control-panel class="fjs-control-panel" name="Scatterplot Panel">
<data-box class="fjs-data-box" <data-box class="fjs-data-box"
header="Numerical Variables" header="Numerical Variables"
:dataTypes="['numerical', 'numerical_array']" :dataTypes="['numerical', 'numerical_array']"
...@@ -13,18 +13,16 @@ ...@@ -13,18 +13,16 @@
v-on:update="update_categoryData"> v-on:update="update_categoryData">
</data-box> </data-box>
<hr class="fjs-seperator"/> <hr class="fjs-seperator"/>
<fieldset class="fjs-correlation-method"> <fieldset class="fjs-fieldset">
<legend>Correlation Method</legend> <legend>Correlation Method</legend>
<label> <label>
<input type="radio" value="pearson" v-model="params.method"> <input type="radio" value="pearson" v-model="params.method">
Pearson Pearson
</label> </label>
<br/>
<label> <label>
<input type="radio" value="spearman" v-model="params.method"> <input type="radio" value="spearman" v-model="params.method">
Spearman Spearman
</label> </label>
<br/>
<label> <label>
<input type="radio" value="kendall" v-model="params.method"> <input type="radio" value="kendall" v-model="params.method">
Kendall Kendall
...@@ -115,7 +113,7 @@ ...@@ -115,7 +113,7 @@
import StateSaver from '../mixins/state-saver' import StateSaver from '../mixins/state-saver'
import _ from 'lodash' import _ from 'lodash'
export default { export default {
name: 'correlation-analysis', name: 'scatterplot',
data () { data () {
return { return {
error: '', error: '',
...@@ -193,7 +191,7 @@ ...@@ -193,7 +191,7 @@
subsets () { subsets () {
return [...new Set(this.shownResults.data.map(d => d.subset))] return [...new Set(this.shownResults.data.map(d => d.subset))]
}, },
points () { scaledPoints () {
return this.shownResults.data.map(d => { return this.shownResults.data.map(d => {
const x = this.scales.x(d.value_x) const x = this.scales.x(d.value_x)
const y = this.scales.y(d.value_y) const y = this.scales.y(d.value_y)
...@@ -296,7 +294,7 @@ ...@@ -296,7 +294,7 @@
this.selectedPoints = [] this.selectedPoints = []
} else { } else {
const [[x0, y0], [x1, y1]] = d3.event.selection const [[x0, y0], [x1, y1]] = d3.event.selection
this.selectedPoints = this.points.filter(d => { this.selectedPoints = this.scaledPoints.filter(d => {
return x0 <= d.x && d.x <= x1 && y0 <= d.y && d.y <= y1 return x0 <= d.x && d.x <= x1 && y0 <= d.y && d.y <= y1
}) })
if (this.selectedPoints.length > 0 && this.selectedPoints.length < 3) { if (this.selectedPoints.length > 0 && this.selectedPoints.length < 3) {
...@@ -402,7 +400,7 @@ ...@@ -402,7 +400,7 @@
} }
} }
}, },
'points': { 'scaledPoints': {
handler: function (newPoints) { handler: function (newPoints) {
this.$nextTick(() => this.drawPoints(newPoints)) this.$nextTick(() => this.drawPoints(newPoints))
} }
...@@ -477,17 +475,6 @@ ...@@ -477,17 +475,6 @@
<style lang="sass" scoped> <style lang="sass" scoped>
@import '~assets/base.sass' @import '~assets/base.sass'
.fjs-control-panel
.fjs-correlation-method
white-space: nowrap
border: solid 1px #fff
text-align: left
border-radius: 3px
padding: 0 0.5vw 0 0.5vw
legend
color: #fff
border: none
margin: 0
svg svg
.fjs-lin-reg-line .fjs-lin-reg-line
stroke: #ff5e00 stroke: #ff5e00
......
...@@ -121,7 +121,6 @@ ...@@ -121,7 +121,6 @@
height: 10vh height: 10vh
min-width: 15vw min-width: 15vw
border: 1px solid #fff border: 1px solid #fff
border-radius: 3px
overflow-y: scroll overflow-y: scroll
padding: 0.3vh 17px 0.3vh 0.3vw padding: 0.3vh 17px 0.3vh 0.3vw
.fjs-item .fjs-item
......
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