#13903 Harmonize correlation and tornado bar-chart behavior

Extract shared helpers into a new RimCorrelationBarChartTools
namespace so RimCorrelationPlot and RimRftTornadoPlot share a
single source of truth for:

- highlightSelectedParameterBar and the click-to-parameter-name
  lookup
- the axis-label format, abs/sort-value math, and the
  addBarEntry call (with the "legendText must equal parameter
  name" convention) via addCorrelationBar

Also enable click-to-select on RimCorrelationPlot: use the
parameter name as the bar chart title so click-to-select works,
and recolor the selected bar via a new HighlightBarColor field,
mirroring the pattern used in RimRftTornadoPlot.
This commit is contained in:
Magne Sjaastad committed 2026-04-20 11:41:26 +02:00
1 parent 4dfe238fef
commit 99910c3d7d
8 files changed
+183 -75

No files matched your search

@@ -714,6 +714,7 @@ void RimCorrelationReportPlot::onDataSelection( const caf::SignalEmitter*
auto curveDef = parameterAndCurveDef.second;
m_correlationPlot->setCurveDefinitions( { curveDef } );
m_correlationPlot->setSelectedParameter( paramName );
m_correlationPlot->loadDataAndUpdate();
m_parameterResultCrossPlot->setCurveDefinitions( { curveDef } );
m_parameterResultCrossPlot->setEnsembleParameter( paramName );