Skip to content
View as Markdown

Enum Members:

  • BAR (“bar”)
  • LINE (“line”)
  • PIE (“pie”)
  • SCATTER (“scatter”)
  • UNKNOWN (“unknown”)
function parseChart(chart: Chart): Chart

Parameters:

  • chart Chart

Returns:

  • Chart

type BarChart = Chart2D & {
type: "bar";
};

Type declaration:

  • type “bar”
type BarData = Pick<GeneratedChartElement, "group" | "label" | "value">;

type BoxAndWhiskerChart = Chart2D & {
type: "box_and_whisker";
};

Type declaration:

  • type “box_and_whisker”
type BoxAndWhiskerData = Pick<GeneratedChartElement, "first_quartile" | "label" | "max" | "median" | "min" | "outliers">;

type Chart = GeneratedChart;

type Chart2D = Pick<GeneratedChart, "type" | "title" | "png" | "x_label" | "y_label" | "elements">;

type ChartElement = GeneratedChartElement;

type CompositeChart = Pick<GeneratedChart, "type" | "title" | "png" | "elements"> & {
type: "composite_chart";
};

Type declaration:

  • type “composite_chart”
type LineChart = PointChart & {
type: "line";
};

Type declaration:

  • type “line”
type PieChart = Pick<GeneratedChart, "type" | "title" | "png" | "elements"> & {
type: "pie";
};

Type declaration:

  • type “pie”
type PieData = Pick<GeneratedChartElement, "angle" | "label" | "radius">;

type PointChart = Pick<GeneratedChart,
| "type"
| "title"
| "png"
| "x_label"
| "y_label"
| "x_ticks"
| "y_ticks"
| "x_tick_labels"
| "y_tick_labels"
| "x_scale"
| "y_scale"
| "elements">;

type PointData = Pick<GeneratedChartElement, "label" | "points">;

type ScatterChart = PointChart & {
type: "scatter";
};

Type declaration:

  • type “scatter”