docs: Отображение результативности

This commit is contained in:
Леонид Титов 2024-12-06 11:12:08 +03:00
parent 3954fe8ef9
commit 9a8f8abbe4

View File

@ -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)