Summary Multi Plot : Improve default behaviour (#8885)

* Summary Multi Plot : Improve default behaviour

- Perform zoom when stepping to next item
- Set defaults for range aggregation and source stepping dimension based on content when creating a multi summary plot

* Plot Axis Appearance : Do not use bold for text configuration

* Improve how scale factor for legend values are computed

* Improve defaults for range aggregation and step dimension

* Reorder Capability : Get UI item before reordering is issued

Get UI item before reordering is issued, as this operation will invalidate the tree model
This commit is contained in:
Magne Sjaastad
2022-05-06 12:09:55 +02:00
committed by GitHub
parent 74075cc9ab
commit 74ace7ea44
8 changed files with 105 additions and 20 deletions

View File

@@ -639,6 +639,68 @@ void RimSummaryMultiPlot::zoomAll()
syncAxisRanges();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryMultiPlot::setDefaultRangeAggregationSteppingDimension()
{
RiaSummaryAddressAnalyzer analyzer;
for ( auto p : summaryPlots() )
{
auto addresses = RimSummaryAddressModifier::createEclipseSummaryAddress( p );
analyzer.appendAddresses( addresses );
}
auto rangeAggregation = AxisRangeAggregation::SUB_PLOTS;
if ( !analyzer.wellNames().empty() )
{
rangeAggregation = AxisRangeAggregation::WELLS;
}
else if ( !analyzer.groupNames().empty() )
{
rangeAggregation = AxisRangeAggregation::SUB_PLOTS;
}
else if ( !analyzer.regionNumbers().empty() )
{
rangeAggregation = AxisRangeAggregation::REGIONS;
}
else if ( !analyzer.aquifers().empty() )
{
rangeAggregation = AxisRangeAggregation::SUB_PLOTS;
}
else if ( !analyzer.blocks().empty() )
{
rangeAggregation = AxisRangeAggregation::SUB_PLOTS;
}
auto stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::QUANTITY;
if ( analyzer.wellNames().size() == 1 )
{
stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::WELL;
}
else if ( analyzer.groupNames().size() == 1 )
{
stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::GROUP;
}
else if ( analyzer.regionNumbers().size() == 1 )
{
stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::REGION;
}
else if ( analyzer.aquifers().size() == 1 )
{
stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::AQUIFER;
}
else if ( analyzer.blocks().size() == 1 )
{
stepDimension = RimSummaryPlotSourceStepping::SourceSteppingDimension::BLOCK;
}
m_axisRangeAggregation = rangeAggregation;
m_sourceStepping->setStepDimension( stepDimension );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------