Read legend position from workbook.
This commit is contained in:
parent
6a09cf3551
commit
764913207c
|
@ -694,6 +694,8 @@ void mpFXY::Plot( wxDC& dc, mpWindow& w )
|
|||
// the main trace show this point
|
||||
dc.DrawLine( x0, ymin0, x0, ymax0 );
|
||||
}
|
||||
#else
|
||||
if( x0 ) { }; // Quiet CLang
|
||||
#endif
|
||||
|
||||
x0 = x1;
|
||||
|
|
|
@ -1859,6 +1859,13 @@ bool SIMULATOR_FRAME_UI::loadJsonWorkbook( const wxString& aPath )
|
|||
|
||||
plotTab->SetDottedSecondary( tab_js[ "dottedSecondary" ] );
|
||||
plotTab->ShowGrid( tab_js[ "showGrid" ] );
|
||||
|
||||
if( tab_js.contains( "legend" ) )
|
||||
{
|
||||
const nlohmann::json& legend_js = tab_js[ "legend" ];
|
||||
plotTab->SetLegendPosition( wxPoint( legend_js[ "x" ], legend_js[ "y" ] ) );
|
||||
plotTab->ShowLegend( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue