Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractal.js
Commits
7a45b974
Commit
7a45b974
authored
Apr 21, 2017
by
Sascha Herzinger
Browse files
Eye candy and error messages
parent
b8e5463e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/charts/CorrelationAnalysis.vue
View file @
7a45b974
...
...
@@ -12,12 +12,15 @@
</data-box>
</div>
<input
id=
"run-analysis-btn"
type=
"button"
@
click=
"runAnalysisWrapper(
{init: true})"
value="Run Analysis"
:disabled="disabled"/>
<div
style=
"text-align: center;"
>
<button
id=
"run-analysis-btn"
type=
"button"
@
click=
"runAnalysisWrapper(
{init: true})"
:disabled="disabled">Run Analysis
</button><br/>
<br/>
<span>
{{
error
}}
</span>
</div>
<br/>
<div
id=
"visualisation-section"
style=
"height: 75%;"
>
<table
class=
"stats-table"
v-show=
"! shownAnalysisResults.init"
>
<tr>
...
...
@@ -108,6 +111,7 @@
name
:
'
correlation-analysis
'
,
data
()
{
return
{
error
:
''
,
width
:
0
,
height
:
0
,
xyData
:
[],
...
...
@@ -281,6 +285,7 @@
return
d3
.
brush
()
.
extent
([[
0
,
0
],
[
this
.
padded
.
width
,
this
.
padded
.
height
]])
.
on
(
'
end
'
,
()
=>
{
this
.
error
=
''
if
(
!
d3
.
event
.
selection
)
{
this
.
selectedPoints
=
[]
this
.
runAnalysisWrapper
({
init
:
false
})
...
...
@@ -292,11 +297,15 @@
const
y
=
this
.
scales
.
y
(
d
.
y
)
return
x0
<=
x
&&
x
<=
x1
&&
y0
<=
y
&&
y
<=
y1
;
})
this
.
runAnalysisWrapper
({
init
:
false
})
if
(
this
.
selectedPoints
.
length
>
0
&&
this
.
selectedPoints
.
length
<
3
)
{
this
.
error
=
'
Selection must be zero (everything is selected) or greater than two.
'
}
else
{
this
.
runAnalysisWrapper
({
init
:
false
})
}
})
},
histograms
()
{
const
BINS
=
1
0
const
BINS
=
1
4
let
xBins
=
[],
yBins
=
[]
if
(
!
this
.
tmpAnalysisResults
.
init
)
{
const
[
xMin
,
xMax
]
=
this
.
tmpScales
.
x
.
domain
()
...
...
@@ -496,6 +505,16 @@
#brush
{
stroke-width
:
0
;
}
#run-analysis-btn
{
width
:
200px
;
height
:
30px
;
box-shadow
:
2px
2px
4px
0
#999
;
}
#run-analysis-btn
:not
([
disabled
])
:hover
{
cursor
:
pointer
;
}
</
style
>
<!--CSS for dynamically created components-->
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment