diff --git a/src/gui/plotter.py b/src/gui/plotter.py index 5c0a894..aafa981 100644 --- a/src/gui/plotter.py +++ b/src/gui/plotter.py @@ -1,5 +1,7 @@ import pandas as pd -from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QGraphicsRectItem +from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QGraphicsRectItem +from PyQt5.QtGui import QFont + import pyqtgraph as pg import numpy as np from numpy import floating @@ -160,9 +162,13 @@ class PlotWidget(BasePlotWidget): if settings["performance"]: tesla_TWC = round((1 - TWC_time/tesla_time)*100,2) tesla_ideal = round((1 - ideal_time/tesla_time)*100,2) - TWC_ideal = round((TWC_time/ideal_time - 1)*100,2) - performance_label = QLabel(f"Сокращение длительности: фактическое = {tesla_TWC} %, идеальное = {tesla_ideal} %, разница идеала и факта = {TWC_ideal}%") + TWC_ideal = round((ideal_time/TWC_time)*100,2) + + performance_label = QLabel(f"Сокращение длительности: фактическое = {tesla_TWC} %, идеальное = {tesla_ideal} %; КДИП = {TWC_ideal}%") layout.addWidget(performance_label) + + performance_label.update() + layout.addWidget(plot_widget) widget.setLayout(layout)