"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var data_forge_1 = require("data-forge");
var data_forge_2 = require("data-forge");
var plot_api_1 = require("./plot-api");
var chart_def_1 = require("./chart-def");
exports.ChartType = chart_def_1.ChartType;
function plotSeries(plotConfig, axisMap) {
    var amt = this.count();
    var serializedData = this.inflate(function (value) { return ({ __value__: value }); })
        .zip(this.getIndex().head(amt), function (row, index) {
        row.__index__ = index;
        return row;
    })
        .serialize();
    return new plot_api_1.PlotAPI(serializedData, plotConfig || {}, false, axisMap);
}
data_forge_1.Series.prototype.startPlot = plot_api_1.startPlot;
data_forge_1.Series.prototype.endPlot = plot_api_1.endPlot;
data_forge_1.Series.prototype.plot = plotSeries;
function plotDataFrame(plotDef, axisMap) {
    var amt = this.count();
    var df = this.zip(this.getIndex().head(amt), function (row, index) {
        row.__index__ = index;
        return row;
    });
    var serializedData = df.serialize();
    return new plot_api_1.PlotAPI(serializedData, plotDef || {}, true, axisMap);
}
data_forge_2.DataFrame.prototype.startPlot = plot_api_1.startPlot;
data_forge_2.DataFrame.prototype.endPlot = plot_api_1.endPlot;
data_forge_2.DataFrame.prototype.plot = plotDataFrame;
//# sourceMappingURL=index.js.map