If you carrying chocolate onto the plane it's better to store it under the seat in front of you rather than in the overhead. I often take homemade chocolate truffles as gifts when I travel, and once on debarking I found the box of truffles I had carried on was half melted because the floor of the overhead bin got warm from the overhead lights. The area at your feet will stay cool, as you've probably noticed if you remove your shoes in the cabin.
When I travel in winter I usually pack the truffles in my checked luggage, and they come through fine.