Letters of Rec

I’ve always been told to get letters of rec from the teachers who know me best in classes that I excelled in. This year I took AP chemistry, and I got a C in the class. It was pretty heartbreaking because I did everything I possibly could to do well, and still ended with a C, however my teacher can speak a lot to my work ethic in the class, because I worked very hard, probably harder than any other class I’ve taken. She likes me a lot but I’m not her absolute favorite. She can be intimidating at times but I like her, and she knows me as a good student. Some people have told me that having her write my rec will help balance the fact I got a C because it shows I worked hard, however on the other hand others say its a bad idea because she ended me with a C, and thus may not have the substance to write a good rec. Is getting a letter of rec from her a good idea?