/*
* Chalkboard - Plotting Namespace
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
///
namespace Chalkboard {
/**
* The plotting namespace
* @namespace
*/
export namespace plot {
/** @ignore */
const getContext = (): CanvasRenderingContext2D => {
try {
return Function('"use strict"; return (' + Chalkboard.CONTEXT + ')')() as CanvasRenderingContext2D;
} catch (e) {
throw new Error(`Chalkboard.plot.getContext: Cannot initialize canvas context. Make sure an HTML