VTKChartLegend not movable

(ChristopherWaters) #1

My VTKChartLegend is unmovable, even with this returning true:

chart->GetLegend()->GetDragEnabled();

Everything else about my VTKChartXY is working, and the interactor seems to be fully functional except for this. I am not setting the legend’s position anywhere either, only showing it.

Info:
Win64 on 64bit machine, vtk8.2.0, Qt5.13.0, compiled/built in MCVS2017(Release x64) with cmake3.15.0

(ChristopherWaters) #2

Not sure why but this fixed it:

chart->GetLegend()->SetHorizontalAlignment(vtkChartLegend::CUSTOM);

Would love to know why this is needed, if anyone knows.