During writing I've added a 100uF capacitor and 100nF on the power supply,
Each chip needs a 100nF ceramic capacitor between power and ground as close to the chips as possible with as shorter leads as possible.
I can't see in the code where you tell the library how many chips you have.
There is either a call or you have to change a number in the library file.
Please read this:-
How to use this forum
Because your post is breaking the rules about posting code.