Qt Chart custom line series with labels
-
Hello everyone!
I'm trying to implement custom line series with the following behaviour and appearance: Instead of points I need to display labels in appropriate y-coordinate, but with the fixed x-coordinate (that can be set different). Text that should be displayed should be equal to real x-coordinate. When I have tried to implement it with built-in plots I have faces with the issue that
pointLabelsFormat
property can be used with only x and y coordinate. In my case I need to use some constant x coordinate but display the real one. So this approach isn't suitable for me (looks like).Then I have tried to implement manually custom plot with the
QGraphicsItem
but in this case I have received incorrect drawing out of chart bounds (some graphical artefacts can be found there while scrolling the plot e.g.).What is the correct way to implement such behaviour? As I supposed this question not only about QML, but about base Qt QChart widget.
-
Hello everyone!
I'm trying to implement custom line series with the following behaviour and appearance: Instead of points I need to display labels in appropriate y-coordinate, but with the fixed x-coordinate (that can be set different). Text that should be displayed should be equal to real x-coordinate. When I have tried to implement it with built-in plots I have faces with the issue that
pointLabelsFormat
property can be used with only x and y coordinate. In my case I need to use some constant x coordinate but display the real one. So this approach isn't suitable for me (looks like).Then I have tried to implement manually custom plot with the
QGraphicsItem
but in this case I have received incorrect drawing out of chart bounds (some graphical artefacts can be found there while scrolling the plot e.g.).What is the correct way to implement such behaviour? As I supposed this question not only about QML, but about base Qt QChart widget.
@St-Stanislav No,you can't modify pointdLabel