Right-click on the line/edge which you want to define as the rotation axis.
-> The corresponding context menu opens.
Select the Attributes -> Rotation axis command.
-> The line/edge initially marked in red then appears as a dot-dash axis and a corresponding icon is displayed in the sketch history [Sketch history] next to the feature containing the rotation axis.
Apply this change by clicking on the Sketch OK button.
The rotation axis [Rotation axis] is now also visible in the 3D view.