what type of figurative Language is and why

The swans were graceful as ballerinas

The type of figurative language used in the sentence "The swans were graceful as ballerinas" is simile.

This is because it uses the word "as" to compare the gracefulness of the swans to the gracefulness of ballerinas. A simile is a figure of speech that compares two unlike things using "like" or "as." In this case, it is comparing the swans to ballerinas to evoke the image of elegance and fluidity.