Force scalarBarActor Rerender

Is there a way to force scalarBarActor text labels to render?

Strangely it seems like they only render after a mouseMove event? This is both when created initially and after calling setAxisLabel().

I’ve tried calling:

item.legend.update()
item.legend.updatePolyDataForBarSegments()
item.legend.updatePolyDataForLabels()
item.legend.updateTextureAtlas()
item.legend.setAllocatedRenderTime(10)

Thanks in advance for any advice!

I’ve figured out how to do this.

// when creating vtkScalarBarActor
...
scalarBarActor.setMapper(mapper)
...
// when you want to update axisLabel
...
scalarBarActor.setAxisLabel( 'New Label' )
scalarBarActor.getMapper().getLookupTable().resetAnnotations()
...

Not sure if this is a recent ish feature or not. Glad to have found it! Maybe it’ll help someone else.