mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #8387 from OPM/qtcharts-summary-plots
Closes #8228 Major refactoring of summary plotting. Now possible to create plots both with Qwt and QtChart as plotting tool.
This commit is contained in:
committed by
GitHub
parent
d9bb82de91
commit
258fbddc10
@@ -117,7 +117,7 @@ void RimAsciiDataCurve::updateZoomInParentPlot()
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAncestorOrThisOfType( plot );
|
||||
|
||||
plot->updateZoomInQwt();
|
||||
plot->updateZoomInParentPlot();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -140,7 +140,7 @@ void RimAsciiDataCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
||||
{
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues( dateTimes, values, isLogCurve );
|
||||
m_plotCurve->setSamplesFromTimeTAndYValues( dateTimes, values, isLogCurve );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -156,17 +156,17 @@ void RimAsciiDataCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
}
|
||||
}
|
||||
|
||||
m_qwtPlotCurve->setSamplesFromXValuesAndYValues( times, values, isLogCurve );
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( times, values, isLogCurve );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(), std::vector<double>(), isLogCurve );
|
||||
m_plotCurve->setSamplesFromTimeTAndYValues( std::vector<time_t>(), std::vector<double>(), isLogCurve );
|
||||
}
|
||||
|
||||
updateZoomInParentPlot();
|
||||
|
||||
if ( m_parentQwtPlot ) m_parentQwtPlot->replot();
|
||||
if ( m_parentPlot ) m_parentPlot->replot();
|
||||
}
|
||||
|
||||
updateQwtPlotAxis();
|
||||
@@ -197,17 +197,7 @@ void RimAsciiDataCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAsciiDataCurve::updateQwtPlotAxis()
|
||||
{
|
||||
if ( m_qwtPlotCurve )
|
||||
{
|
||||
if ( this->yAxis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
|
||||
{
|
||||
m_qwtPlotCurve->setYAxis( QwtPlot::yLeft );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setYAxis( QwtPlot::yRight );
|
||||
}
|
||||
}
|
||||
if ( m_plotCurve ) updateAxisInPlot( this->yAxis() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user