What is the exact temperature, do you know?
At this age, a niacin deficiency is unlikely; the condition itself tends to occur when birds are in growing age where nutrients are at their highest demand. Leg problems in ducklings are likely to be associated with trauma, musculoskeletal...
What is the temperature in the ducklings housing area? In the picture, it appears cold and is trying to maintain body heat.
Have you thoroughly inspected the duckling, checking it's legs for any angulation, discoloration, swelling, lesions, or fusion of the joints? If you gently bend its leg...