Well, to be fair, she's not fully alone there, or fully on her own. Her father sets her up, telling her to read from a specific book, etc. In her response there we see that she is obedient. After that, she shows a kind of bravery, in approaching Hamlet after the "To be, or not to be" speech. (He's just talked of suicide and knives, after all.)
This sort of quiet bravery continues, as she stays talking to him even when Hamlet gets abusive and confusing. Ophelia shows a kind of virtue (in staying with the conversation, but also in trusting heaven), and, in her later comments, a strong compassion.