chart problem solved
screen width and height function added
input pin removed