 ++j){
            A[i][j] = Math.pow(chebyshev_xs[i], j);
        }
        B[i] = chebyshev_ys[i];
    }

    X = solved_linear(A, B, chebyshev_n);

    chebyshev_context.beginPath();
    for(var j = 1; j < w; ++j){
        x1 = chebyshev_client_to_x(j-1);
        x2 = chebyshev_client_to_x(j);
        y1 = polynomial_in_x(X, x1, chebyshev_n);
        y2 = polynomial_in_x(X, x2, chebyshev_n);
        chebyshev_context.moveTo(chebyshev_x_to_client(x1), chebyshev_y_to_client(y1));
        chebyshev_context.