JS chart bugfix