Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.7, 6.5.0
-
edfcf8b30 (dev), 96a59f576 (6.5), 36bdd612d (tqtc/lts-6.2)
Description
Scatter points become invisible or are plotted incorrectly while size configuration is applied and later any event triggers a repaint of series such that size configuration is needed to be applied on the points again internally.
A simple example to reproduce the problem -
from PySide6.QtCharts import QChart, QChartView, QScatterSeries, QValueAxis from PySide6.QtWidgets import QMainWindow, QApplication from PySide6.QtCore import Qt app = QApplication([]) main_window = QMainWindow() main_window.resize(500,500) chart = QChart() x_axis = QValueAxis() x_axis.setRange(0,10) chart.addAxis(x_axis, Qt.AlignBottom) y_axis = QValueAxis() y_axis.setRange(0, 10) chart.addAxis(y_axis, Qt.AlignLeft) chart_view = QChartView(chart, main_window) main_window.setCentralWidget(chart_view) scatter_series = QScatterSeries() chart.addSeries(scatter_series) scatter_series.attachAxis(x_axis) scatter_series.attachAxis(y_axis) main_window.show() scatter_series.append(2.5, 2.5) scatter_series.append(7.5, 7.5) scatter_series.sizeBy([1,2], 10, 20) app.exec()
For the scatter series created by the above code, points appear correctly at first.
Now try to resize the main window. Points will either disappear or will be plotted at incorrect positions.
Similar situation happens if we try to replace a particular point in scatter series by some other point after calling `sizeBy` method.