Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LaVizu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
behaviors-ai-public
LaVizu
Commits
fa503538
Commit
fa503538
authored
Apr 09, 2019
by
Dorian Goepp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A cool linechart of the involvement
parent
fcc411c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
14 deletions
+23
-14
src/LineChart/RosLineChart.js
src/LineChart/RosLineChart.js
+16
-13
src/devel-config.js
src/devel-config.js
+6
-0
src/index.js
src/index.js
+1
-1
No files found.
src/LineChart/RosLineChart.js
View file @
fa503538
...
...
@@ -11,15 +11,14 @@ class RosLineChart extends Component {
this
.
state
=
{
data
:
{
""
:
[]},
topic
:
{
name
:
"
/
random/trace
"
,
messageType
:
"
april_messages/
trace
"
,
name
:
"
/
predictions/interaction_involvement
"
,
messageType
:
"
april_messages/
head_orientation_prediction
"
,
fields
:
[
"
enacted.valence
"
,
"
enacted.occurence
"
,
"
prediction_of_head_orientation.list[0].values[1]
"
,
]
},
// xLabel: "
x label
",
// yLabel: "y label"
// xLabel: "
Count
",
yLabel
:
"
Involvement
"
,
};
}
...
...
@@ -42,6 +41,8 @@ class RosLineChart extends Component {
if
(
!
(
field
in
new_data
))
{
new_data
[
field
]
=
[]
}
console
.
debug
(
"
Raw message:
"
,
message
);
console
.
debug
(
"
Selected field:
"
,
property
(
field
)(
message
));
new_data
[
field
]
=
this
.
state
.
data
[
field
].
concat
([{
"
y
"
:
property
(
field
)(
message
)}])
})
return
{
...
...
@@ -63,14 +64,16 @@ class RosLineChart extends Component {
render
()
{
const
config
=
this
.
props
.
node
.
getConfig
()
if
(
config
.
displayMode
===
"
readme
"
)
{
return
<
p
className
=
"
about
"
>
This
<
b
>
linechart
<
/b> represents a <b>measure</
b
>
evolving
over
time
.
<
/p>
;
}
if
(
config
&&
'
displayMode
'
in
config
)
{
if
(
config
.
displayMode
===
"
readme
"
)
{
return
<
p
className
=
"
about
"
>
This
<
b
>
linechart
<
/b> represents a <b>measure</
b
>
evolving
over
time
.
<
/p>
;
}
if
(
config
.
displayMode
===
"
settings
"
)
{
return
<
div
>
<
p
>
config
panel
<
/p
>
<
/div>
;
if
(
config
.
displayMode
===
"
settings
"
)
{
return
<
div
>
<
p
>
config
panel
<
/p
>
<
/div>
;
}
}
return
<
SizedLineChart
data
=
{
this
.
state
.
data
}
xLabel
=
{
this
.
state
.
xLabel
}
yLabel
=
{
this
.
state
.
yLabel
}
{...
this
.
props
}
/
>
...
...
src/devel-config.js
View file @
fa503538
...
...
@@ -48,6 +48,7 @@ export const flexlayout_json = {
{
"
type
"
:
"
tabset
"
,
"
name
"
:
"
Robot's memory
"
,
"
enableTabStrip
"
:
true
,
"
weight
"
:
65
,
"
selected
"
:
0
,
"
children
"
:
[
...
...
@@ -58,6 +59,11 @@ export const flexlayout_json = {
"
hasReadme
"
:
true
},
},
{
"
type
"
:
"
tab
"
,
"
component
"
:
"
line-chart
"
,
"
name
"
:
"
involvement
"
,
}
]
},
{
...
...
src/index.js
View file @
fa503538
...
...
@@ -51,4 +51,4 @@ class Main extends React.Component {
}
}
ReactDOM
.
render
(
<
Main
ros
=
{
false
}
/>, document.getElementById
(
"container"
))
;
\ No newline at end of file
ReactDOM
.
render
(
<
Main
ros
=
{
true
}
/>, document.getElementById
(
"container"
))
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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