-
Suggestion
-
Resolution: Won't Do
-
P4: Low
-
None
-
all
-
None
It'd be helpful to have a Python version of the code for subclassing QValue3DAxisFormatter added to:
https://doc.qt.io/qtforpython/examples/index.html#datavisualization
There is currently this one:Qt Quick 2 Axis Formatter Example - Qt for Python, but it doesn't appear to all be Python code or runnable in any way.
In particular, the documented access and modification of gridPositions(), labelPositions(), and labelStrings() does not work:
gridPositions().resize(gridCount)
.....
gridPositions()[i] = float(gridValue)
labelPositions()[i] = float(gridValue)
labelStrings() << minFullDate.addDays.toString(axis().labelFormat())
In Python, each of the methods on the left (if prepended with 'self.') returns a list that cannot be modified or assigned anything nor has a resize method. The code seems to be mixed with direct copy from the C++ example found at [Qt Quick 2 Axis Formatter Example | Qt Data Visualization 5.15.10|https://doc.qt.io/qt-5/qtdatavisualization-qmlaxisformatter-example.html#custom-axis-formatter].
QList<float> &QValue3DAxisFormatter::gridPositions() const QList<float> &QValue3DAxisFormatter::labelPositions() const QStringList &QValue3DAxisFormatter::labelStrings() const
- relates to
-
PYSIDE-2019 Python code for QValue3DAxisFormatter for non-QML chart
-
- Closed
-