mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Move plot legend to top
This commit is contained in:
parent
30284bf6b1
commit
5aba1072e4
2 changed files with 8 additions and 5 deletions
|
@ -79,7 +79,8 @@ class WidgetPlotTable extends Component {
|
|||
accum.push(
|
||||
{
|
||||
index: signal_index,
|
||||
name: model_signal.name
|
||||
name: model_signal.name,
|
||||
type: model_signal.type
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -129,7 +130,8 @@ class WidgetPlotTable extends Component {
|
|||
if (this.state.signals.includes(signal.index)) {
|
||||
accum.push({
|
||||
index: signal.index,
|
||||
name: signal.name
|
||||
name: signal.name,
|
||||
type: signal.type
|
||||
});
|
||||
}
|
||||
return accum;
|
||||
|
@ -138,6 +140,8 @@ class WidgetPlotTable extends Component {
|
|||
return (
|
||||
<div className="plot-table-widget" ref="wrapper">
|
||||
<div className="content">
|
||||
<PlotLegend signals={legendSignals} />
|
||||
|
||||
<div className="table-plot-row">
|
||||
<div className="widget-table">
|
||||
{ checkBoxes.length > 0 ? (
|
||||
|
@ -162,7 +166,6 @@ class WidgetPlotTable extends Component {
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<PlotLegend signals={legendSignals} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -64,6 +64,8 @@ class WidgetPlot extends React.Component {
|
|||
|
||||
render() {
|
||||
return <div className="plot-widget" ref="wrapper">
|
||||
<PlotLegend signals={this.state.legend} />
|
||||
|
||||
<div className="widget-plot">
|
||||
<Plot
|
||||
data={this.state.data}
|
||||
|
@ -77,8 +79,6 @@ class WidgetPlot extends React.Component {
|
|||
yLabel={this.props.widget.ylabel}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<PlotLegend signals={this.state.legend} />
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue