Skip to content

Commit

Permalink
Move stacked area check and window sizing in check for any variables
Browse files Browse the repository at this point in the history
selected
  • Loading branch information
mjprilliman committed Dec 20, 2024
1 parent 6bb9338 commit c495f65
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/results.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,29 +699,34 @@ void ResultsViewer::SetDViewState(wxDVPlotCtrlSettings& settings)
}



//***TimeSeries Properties***
m_timeSeries->SetStackingOnYLeft(true); //Turn on stacked area plot
m_timeSeries->SetTopSelectedNames(settings.GetProperty(wxT("tsTopSelectedNames")));
m_timeSeries->SetBottomSelectedNames(settings.GetProperty(wxT("tsBottomSelectedNames")));


// select something by default
if (m_timeSeries->GetNumberOfSelections() == 0) {

//***TimeSeries Properties***
m_timeSeries->SetStackingOnYLeft(true); //Turn on stacked area plot


m_timeSeries->SelectDataSetAtIndex(batt_index, 0);
m_timeSeries->SelectDataSetAtIndex(grid_index, 0);
m_timeSeries->SelectDataSetAtIndex(gen_index, 0);
m_timeSeries->SelectDataSetAtIndex(batt_SOC_index, 0); //right y-axis, battery SOC percentage (%)

//Set min/max after setting plots to make sure there is an axis to set.
if (settings.GetProperty(wxT("tsAxisMin")).ToDouble(&min))
m_timeSeries->SetViewMin(min);
/*
if (settings.GetProperty(wxT("tsAxisMax")).ToDouble(&max))
m_timeSeries->SetViewMax(max);
*/
m_timeSeries->SetViewMax(168); //24 hr/day * 7 days, show first week

}

//Set min/max after setting plots to make sure there is an axis to set.
if (settings.GetProperty(wxT("tsAxisMin")).ToDouble(&min))
m_timeSeries->SetViewMin(min);
/*
if (settings.GetProperty(wxT("tsAxisMax")).ToDouble(&max))
m_timeSeries->SetViewMax(max);
*/
m_timeSeries->SetViewMax(168); //24 hr/day * 7 days, show first week

}


Expand Down

0 comments on commit c495f65

Please sign in to comment.