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
c8c9c666
Commit
c8c9c666
authored
May 30, 2017
by
Sascha Herzinger
Browse files
Adapting to slightly different data structure
parent
e50b5232
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/charts/CorrelationAnalysis.vue
View file @
c8c9c666
...
...
@@ -182,7 +182,8 @@
x
:
`$
${
this
.
xyData
[
0
]}
$`
,
y
:
`$
${
this
.
xyData
[
1
]}
$`
,
id_filter
:
this
.
selectedPoints
.
map
(
d
=>
d
.
id
),
method
:
'
pearson
'
method
:
'
pearson
'
,
annotations
:
this
.
annotationData
.
map
(
d
=>
`$
${
d
}
$`
)
}
},
margin
()
{
...
...
@@ -202,34 +203,40 @@
const
ys
=
[]
const
ids
=
[]
const
subsets
=
[]
const
annotations
=
[]
let
all
=
[]
if
(
!
this
.
shownAnalysisResults
.
init
)
{
all
=
Object
.
keys
(
this
.
shownAnalysisResults
.
data
.
id
).
map
(
key
=>
{
const
x
=
this
.
shownAnalysisResults
.
data
[
this
.
shownAnalysisResults
.
x_label
][
key
]
const
y
=
this
.
shownAnalysisResults
.
data
[
this
.
shownAnalysisResults
.
y_label
][
key
]
const
id
=
this
.
shownAnalysisResults
.
data
.
id
[
key
]
const
subset
=
this
.
shownAnalysisResults
.
data
.
subset
[
key
]
all
=
this
.
shownAnalysisResults
.
data
.
map
(
d
=>
{
const
x
=
d
[
this
.
shownAnalysisResults
.
x_label
]
const
y
=
d
[
this
.
shownAnalysisResults
.
y_label
]
const
id
=
d
.
id
const
subset
=
d
.
subset
const
annotation
=
d
.
annotation
const
tooltip
=
{
[
this
.
shownAnalysisResults
.
x_label
]:
x
,
[
this
.
shownAnalysisResults
.
y_label
]:
y
,
subset
:
subset
subset
}
if
(
typeof
annotation
!==
'
undefined
'
)
{
tooltip
.
annotation
=
annotation
}
xs
.
push
(
x
)
ys
.
push
(
y
)
ids
.
push
(
id
)
subsets
.
push
(
subset
)
return
{
x
,
y
,
id
,
subset
,
tooltip
}
annotations
.
push
(
annotation
)
return
{
x
,
y
,
id
,
subset
,
annotation
,
tooltip
}
})
}
return
{
xs
,
ys
,
ids
,
subsets
,
all
}
return
{
xs
,
ys
,
ids
,
subsets
,
annotations
,
all
}
},
tmpPoints
()
{
const
xs
=
[]
const
ys
=
[]
if
(
!
this
.
tmpAnalysisResults
.
init
)
{
Object
.
keys
(
this
.
tmpAnalysisResults
.
data
.
id
).
forEach
(
key
=>
{
const
x
=
this
.
tmpAnalysisResults
.
data
[
this
.
tmp
AnalysisResults
.
x_label
]
[
key
]
const
y
=
this
.
tmpAnalysisResults
.
data
[
this
.
tmp
AnalysisResults
.
y_label
]
[
key
]
this
.
tmpAnalysisResults
.
data
.
forEach
(
d
=>
{
const
x
=
d
[
this
.
shown
AnalysisResults
.
x_label
]
const
y
=
d
[
this
.
shown
AnalysisResults
.
y_label
]
xs
.
push
(
x
)
ys
.
push
(
y
)
})
...
...
@@ -452,7 +459,8 @@
this
.
runAnalysis
({
task_name
:
'
compute-correlation
'
,
args
})
.
then
(
response
=>
{
const
results
=
JSON
.
parse
(
response
)
results
.
data
=
JSON
.
parse
(
results
.
data
)
const
data
=
JSON
.
parse
(
results
.
data
)
results
.
data
=
Object
.
keys
(
data
).
map
(
key
=>
data
[
key
])
if
(
init
)
{
this
.
shownAnalysisResults
=
results
this
.
tmpAnalysisResults
=
results
...
...
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