#1169 Added unti labels for the three different sets (metric, field, lab)

This commit is contained in:
Jacob Støren 2017-02-13 10:54:21 +01:00
parent edab09823d
commit 22b3d9fca5
2 changed files with 29 additions and 1 deletions

View File

@ -258,7 +258,8 @@ void RimWellAllocationPlot::updateFromWell()
addStackedCurve("Total", connNumbers, accFlow, plotTrack);
}
plotTrack->setXAxisTitle("Flow Rate");
updateWellFlowPlotXAxisTitle(plotTrack);
}
QString wellStatusText = QString("(%1)").arg(RimWellAllocationPlot::wellStatusTextForTimeStep(m_wellName, m_case, m_timeStep));
@ -310,6 +311,32 @@ void RimWellAllocationPlot::updateFromWell()
m_wellAllocationPlotWidget->updateGeometry();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack)
{
RigEclipseCaseData::UnitsType unitSet = m_case->reservoirData()->unitsType();
QString unitText;
switch ( unitSet )
{
case RigEclipseCaseData::UNITS_METRIC:
unitText = "[m^3/day]";
break;
case RigEclipseCaseData::UNITS_FIELD:
unitText = "[Brl/day]";
break;
case RigEclipseCaseData::UNITS_LAB:
unitText = "[cm^3/hr]";
break;
default:
break;
}
plotTrack->setXAxisTitle("Flow Rate " + unitText);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -82,6 +82,7 @@ protected:
private:
void updateFromWell();
void updateWellFlowPlotXAxisTitle(RimWellLogTrack* plotTrack);
void addStackedCurve(const QString& tracerName,
const std::vector<double>& connNumbers,