disorderedmaterials / plot

Testing / proving ground for Qt3D 2D/3D plotting
0 stars 0 forks source link

Axis label count not updated when axis is stretched #40

Open trisyoungs opened 2 years ago

trisyoungs commented 2 years ago

Resizing the widget scales the positions of axis labels as it should, but results in overlap of adjacent labels when the axis bar extent drops below some value. To solve this, tick marks should be updated on resize.

There is probably a nicer way than doing this at every resize event. For instance, the width extent of each text primitive could be stored (if it isn't a;ready) and checked for overlap with its neighbours. If an overlap is detected, the tick labels can then be regenerated.