vela_chart

Version 1.0.0

The Vela chart API

VlJson

A JSON value: null, a boolean, a number, text, an array or an object.

This is the value model the whole of Vela exchanges — a specification arrives as one, the chart API emits one, and the runtime reads one. It is pure Ranger with no host JSON, so the same tree is built on every target, which is what makes a scene comparison against the reference implementation mean anything.

Two things it carries that a plain JSON model does not: object keys keep the order they were written in, so a re-serialised specification is stable; and a number remembers whether it was written as an integer, so 5 does not come back as 5.0.

nullValue()VlJson

Builds the JSON null value.

Returns: A null value.

boolValue(value:boolean)VlJson

Builds a JSON boolean.

  • value — The boolean.

Returns: A boolean value.

numberValue(value:double)VlJson

Builds a JSON number that prints with a fraction, so 5 comes back as 5.0.

  • value — The number.

Returns: A number value.

intValue(value:int)VlJson

Builds a JSON number that prints without a fraction, so 5 stays 5.

JSON has one number type; the text does not. A count written with this prints as a count.

  • value — The whole number.

Returns: A number value that remembers it was written as an integer.

stringValue(value:string)VlJson

Builds a JSON string.

  • value — The text.

Returns: A string value.

arrayValue()VlJson

Builds an empty JSON array.

Returns: An array value with no elements.

objectValue()VlJson

Builds an empty JSON object.

Returns: An object value with no members.

VlDataRow

One row of a dataset, filled column by column.

A row is handed back already attached to its dataset, so nothing has to be pushed anywhere by the caller.

num(field:string value:double)VlDataRow

Puts a number in one column of this row.

  • field — The column name.
  • value — The value.

Returns: This row, so columns chain.

whole(field:string value:int)VlDataRow

Puts a whole number in one column of this row.

A count is an integer and prints as one: 12, not 12.0. Use this rather than num wherever the value counts things, or the axis labels will say so.

  • field — The column name.
  • value — The value.

Returns: This row, so columns chain.

str(field:string value:string)VlDataRow

Puts text in one column of this row.

A column of text is read as a category unless every value in it parses as an ISO date, in which case it is an instant.

  • field — The column name.
  • value — The value.

Returns: This row, so columns chain.

flag(field:string value:boolean)VlDataRow

Puts true or false in one column of this row.

  • field — The column name.
  • value — The value.

Returns: This row, so columns chain.

json(field:string value:VlJson)VlDataRow

Puts an already-built value in one column of this row.

The escape hatch for a column this API has no typed setter for — a nested object a geoshape reads, or a value that came out of the parser.

  • field — The column name.
  • value — The value, as the JSON model holds it.

Returns: This row, so columns chain.

back()VlDataset

Returns to the dataset this row belongs to, so rows chain one after another.

Returns: The owning dataset, or a fresh empty one if this row was built without a dataset.

VlDataset

A table of rows, built once and given to as many charts as want it.

Rows are JSON objects — the same values the parser produces for "data": {"values": […]} — so a dataset built here and one read off disk are the same thing to everything downstream.

The dataset is a value beside the chart rather than a thing inside it: a spreadsheet's selection becomes one dataset and a dashboard's six panels read it.

row()VlDataRow

Adds a row and hands it back, ready to be filled.

Returns: The new row, already attached to this dataset.

addRow(row:VlJson)VlDataset

Adds a row that was built elsewhere.

  • row — A JSON object whose members are the columns.

Returns: This dataset, so calls chain.

fromValues(values:VlJson)VlDataset

Takes the rows of a JSON array as they came out of the parser.

A dataset built here and one read off disk are the same thing to everything downstream, so a selection from a grid, a file somebody read and a literal all arrive the same way.

  • values — A JSON array of row objects.

Returns: This dataset, so calls chain.

numbers(field:string values:[double])VlDataset

Fills one numeric column from an array, one value per row.

Column-wise filling, for a caller that holds arrays rather than records — a spreadsheet column, a series of measurements. Row i of every column is the same row, so two calls with arrays of the same length make a table.

  • field — The column name.
  • values — One value per row, in row order.

Returns: This dataset, so calls chain.

strings(field:string values:[string])VlDataset

Fills one text column from an array, one value per row.

  • field — The column name.
  • values — One value per row, in row order.

Returns: This dataset, so calls chain.

rowAt(index:int)VlJson

The row at an index, growing the dataset with empty rows if it is not there yet.

  • index — A zero-based row number.

Returns: The row object, which can be written into directly.

count()int

How many rows the dataset holds.

Returns: The row count.

hasField(field:string)boolean

Whether any row has this column.

  • field — The column name.

Returns: True when at least one row carries the column.

fieldType(field:string)string

What kind of thing a column holds, in Vega-Lite's vocabulary.

Read off the rows rather than declared: numbers are a quantity, ISO dates are an instant, anything else is a name. A column the data does not have answers the empty string, so a caller can tell "no such column" from "a column of names" — which is the difference between a mistake and a chart.

  • field — The column name.

Returns: quantitative, temporal, nominal, or the empty string when no row has the column.

toValues()VlJson

The dataset as the data block of a specification: {"values": […]}.

Returns: A JSON object holding every row.

create()VlDataset

Builds an empty dataset.

Returns: A dataset with no rows.

VlChartMark

One mark and the channels it reads.

Every setter answers the mark, so a mark is written as one sentence.

aggregate, bin, title and the rest apply to the channel most recently named — the cursor — which is what makes that sentence read in the order it is thought. on moves the cursor back to a channel already set.

A channel names a column. A constant goes through valueNumber or valueString, and the two are kept apart on purpose: .color("red") meaning a column called red and .color("#c00") meaning paint it red cannot both be true, and the version that guesses is the one that draws a chart nobody asked for.

channel(name:string field:string)VlChartMark

Sets any channel to a column by name.

The named channel becomes the cursor, so the next aggregate, title or type applies to it.

  • name — The channel name, as Vega-Lite spells it.
  • field — The column name.

Returns: This mark, so calls chain.

x(field:string)VlChartMark

Position along the horizontal axis.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

y(field:string)VlChartMark

Position along the vertical axis.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

x2(field:string)VlChartMark

The far end of a horizontal interval, for a bar, an area or a rule that spans two values.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

y2(field:string)VlChartMark

The far end of a vertical interval, for a bar, an area or a rule that spans two values.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

color(field:string)VlChartMark

Colour, and the legend that explains it.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

fill(field:string)VlChartMark

Fill colour, set apart from the outline.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

stroke(field:string)VlChartMark

Outline colour, set apart from the fill.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

size(field:string)VlChartMark

Mark size: the area of a point, the width of a trail.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

shape(field:string)VlChartMark

The symbol a point is drawn as.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

opacity(field:string)VlChartMark

How opaque the mark is.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

theta(field:string)VlChartMark

The angle an arc covers, which is what makes a pie or a donut.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

radius(field:string)VlChartMark

How far from the centre an arc reaches.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

detail(field:string)VlChartMark

Groups the rows without drawing anything of its own: one line per group, no legend.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

text(field:string)VlChartMark

The text a label mark shows.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

order(field:string)VlChartMark

The order the rows are drawn in, and the order a line joins its points.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

column(field:string)VlChartMark

Splits the chart into side-by-side panels, one per value.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

row(field:string)VlChartMark

Splits the chart into stacked panels, one per value.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

xOffset(field:string)VlChartMark

What separates the bars of a grouped bar chart, across the horizontal axis.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

yOffset(field:string)VlChartMark

What separates the bars of a grouped bar chart, across the vertical axis.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This mark, so channels chain.

count(channel:string)VlChartMark

Sets a channel to a count of rows: one number per group, with no column to read.

  • channel — The channel to put the count on, usually "y" or "x".

Returns: This mark, so calls chain.

valueNumber(channel:string value:double)VlChartMark

Sets a channel to a constant number rather than to a column.

  • channel — The channel name.
  • value — The constant.

Returns: This mark, so calls chain.

valueString(channel:string value:string)VlChartMark

Sets a channel to a constant string rather than to a column.

This is how a mark is painted a fixed colour: .valueString("color" "#c00"). The channel setters name columns and never constants, because a .color(…) that guessed between the two would draw a chart nobody asked for.

  • channel — The channel name.
  • value — The constant.

Returns: This mark, so calls chain.

encodeJson(channel:string definition:VlJson)VlChartMark

Sets a whole channel from an already-built definition.

The escape hatch. Vega-Lite is larger than any fluent surface over it, and a definition that lands in the same specification is better than waiting for this API to grow a method.

  • channel — The channel name.
  • definition — The channel definition.

Returns: This mark, so calls chain.

on(channel:string)VlChartMark

Moves the cursor back to a channel that is already set.

Everything that follows — aggregate, title, scaleType — applies to it. A channel that was never set is reported in the chart's errors rather than silently created.

  • channel — The channel name.

Returns: This mark, so calls chain.

aggregate(op:string)VlChartMark

How the rows in each group are reduced to one value.

  • opsum, mean, median, min, max, count and the rest of Vega-Lite's operations.

Returns: This mark, so calls chain.

bin()VlChartMark

Bins the cursor channel's column into buckets.

Returns: This mark, so calls chain.

maxBins(count:int)VlChartMark

Bins the cursor channel's column into at most this many buckets.

  • count — The upper bound on the number of bins.

Returns: This mark, so calls chain.

timeUnit(unit:string)VlChartMark

Which part of an instant to read: year, month, yearmonth, hours and the rest.

  • unit — The time unit.

Returns: This mark, so calls chain.

type(kind:string)VlChartMark

States what the column holds, when the data cannot say.

A column of years is numbers and is usually a category, which is the case this exists for.

  • kindquantitative, nominal, ordinal or temporal.

Returns: This mark, so calls chain.

title(label:string)VlChartMark

The axis or legend label for the cursor channel.

  • label — The label.

Returns: This mark, so calls chain.

format(pattern:string)VlChartMark

The number or date format its axis labels are drawn in.

  • pattern — A d3-format or d3-time-format pattern.

Returns: This mark, so calls chain.

stack(how:string)VlChartMark

How marks sharing a position are stacked.

  • howzero, normalize or center.

Returns: This mark, so calls chain.

noStack()VlChartMark

Draws the marks overlapping rather than stacked.

Returns: This mark, so calls chain.

sortBy(field:string)VlChartMark

The order a discrete scale runs in, taken from another column.

  • field — The column to sort by.

Returns: This mark, so calls chain.

keepOrder()VlChartMark

Keeps the order the rows arrived in, rather than sorting alphabetically.

The one every spreadsheet wants.

Returns: This mark, so calls chain.

scaleJson(scale:VlJson)VlChartMark

Sets the cursor channel's whole scale definition.

  • scale — The scale definition.

Returns: This mark, so calls chain.

scaleType(kind:string)VlChartMark

The kind of scale the cursor channel uses.

  • kindlinear, log, sqrt, time, band, point and the rest.

Returns: This mark, so calls chain.

scheme(name:string)VlChartMark

The colour scheme a colour channel draws from.

  • name — A Vega scheme name, such as category10 or viridis.

Returns: This mark, so calls chain.

noLegend()VlChartMark

Draws the cursor channel without a legend.

Returns: This mark, so calls chain.

noAxis()VlChartMark

Draws the cursor channel without an axis.

Returns: This mark, so calls chain.

axisOrient(side:string)VlChartMark

Which side of the plot the cursor channel's axis stands on.

A Pareto chart's cumulative line is measured up the right-hand side, which is the whole point of drawing it there.

  • sideleft, right, top or bottom.

Returns: This mark, so calls chain.

axisJson(axis:VlJson)VlChartMark

Sets the cursor channel's whole axis definition.

  • axis — The axis definition.

Returns: This mark, so calls chain.

propNumber(key:string value:double)VlChartMark

Sets any numeric property of the mark itself.

  • key — The property name.
  • value — The value.

Returns: This mark, so calls chain.

propString(key:string value:string)VlChartMark

Sets any string property of the mark itself.

  • key — The property name.
  • value — The value.

Returns: This mark, so calls chain.

propFlag(key:string value:boolean)VlChartMark

Sets any boolean property of the mark itself.

  • key — The property name.
  • value — The value.

Returns: This mark, so calls chain.

filled(value:boolean)VlChartMark

Whether the mark is filled or drawn as an outline.

  • value — True to fill.

Returns: This mark, so calls chain.

markSize(value:double)VlChartMark

How big every mark is drawn, as one number rather than from a column.

  • value — The size.

Returns: This mark, so calls chain.

markColor(value:string)VlChartMark

Paints every mark one colour, rather than reading a column.

  • value — A CSS colour.

Returns: This mark, so calls chain.

markOpacity(value:double)VlChartMark

How opaque every mark is drawn, as one number rather than from a column.

  • value — 0 to 1.

Returns: This mark, so calls chain.

interpolate(kind:string)VlChartMark

How a line joins its points.

  • kindlinear, monotone, step-after, basis and the rest.

Returns: This mark, so calls chain.

withPoints(value:boolean)VlChartMark

Draws a line showing the points it was drawn through.

  • value — True to show them.

Returns: This mark, so calls chain.

innerRadius(value:double)VlChartMark

The hole in the middle of an arc, which is what turns a pie into a donut.

  • value — The inner radius in pixels.

Returns: This mark, so calls chain.

cornerRadius(value:double)VlChartMark

How rounded the corners of a bar or a rectangle are.

  • value — The radius in pixels.

Returns: This mark, so calls chain.

tooltip(value:boolean)VlChartMark

Shows every column the mark encodes when the reader points at it.

  • value — True to show a tooltip.

Returns: This mark, so calls chain.

tooltipField(field:string)VlChartMark

Shows one named column as the tooltip.

  • field — The column name.

Returns: This mark, so calls chain.

tooltipFields(fields:[string])VlChartMark

Shows several named columns as the tooltip, in the order they should be read.

A list is not a channel, so the cursor does not move onto it: the next title belongs to whatever was named before.

  • fields — The column names, in reading order.

Returns: This mark, so calls chain.

thickness(value:double)VlChartMark

How thick a tick is drawn across its band.

A hi-lo-open-close chart's open and close are ticks, and a two-pixel one is what makes them read as marks rather than as hairlines.

  • value — The thickness in pixels.

Returns: This mark, so calls chain.

strokeWidth(value:double)VlChartMark

How thick the mark's outline is drawn.

  • value — The width in pixels.

Returns: This mark, so calls chain.

orient(value:string)VlChartMark

Which way a tick lies, or which way a bar with only one position channel runs.

  • valuehorizontal or vertical.

Returns: This mark, so calls chain.

extent(value:string)VlChartMark

What an interval mark is computed from.

  • valuestderr, stdev, ci or iqr.

Returns: This mark, so calls chain.

chart()VlChart

Returns to the chart, when the next thing to say is about the view.

Returns: The owning chart, or a fresh empty one if this mark was built without a chart.

VlChart

A chart: a dataset, the channels every mark shares, how big it is, and the marks.

The fluent surface is a writer of specifications, not the engine. Every call writes into a specification and toSpec hands that specification over; nothing here computes a scale, a layout or a pixel. There is no path where the API computes something the engine would have computed differently, because the API computes nothing at all.

A channel said on the chart is inherited by every mark on it, so a line and the points on top of it are two marks and one set of axes rather than two charts.

A channel need not state its type — the data says. A column of numbers is a quantity, a column of ISO dates an instant, anything else a name. A field the data does not have is an error rather than a guess: errors is non-empty and the caller can say so instead of drawing an empty axis.

mark(markType:string)VlChartMark

Adds a mark of any type the compiler knows.

  • markType — The Vega-Lite mark name.

Returns: The new mark, so its channels and properties chain.

bar()VlChartMark

Adds a bar mark to the chart.

A rectangle per row: the bar chart, and with x2/y2 a range.

Returns: The new mark, so its channels and properties chain.

line()VlChartMark

Adds a line mark to the chart.

A line joining the rows in order.

Returns: The new mark, so its channels and properties chain.

area()VlChartMark

Adds an area mark to the chart.

A filled band between a line and a baseline.

Returns: The new mark, so its channels and properties chain.

point()VlChartMark

Adds a point mark to the chart.

One symbol per row: the scatter plot.

Returns: The new mark, so its channels and properties chain.

circle()VlChartMark

Adds a circle mark to the chart.

A filled circle per row — point with the shape settled.

Returns: The new mark, so its channels and properties chain.

square()VlChartMark

Adds a square mark to the chart.

A filled square per row — point with the shape settled.

Returns: The new mark, so its channels and properties chain.

tick()VlChartMark

Adds a tick mark to the chart.

A short stroke per row, across the band it sits in.

Returns: The new mark, so its channels and properties chain.

rule()VlChartMark

Adds a rule mark to the chart.

A line at one value, spanning the plot or between x2/y2.

Returns: The new mark, so its channels and properties chain.

rect()VlChartMark

Adds a rect mark to the chart.

A rectangle over two ranges: the heatmap.

Returns: The new mark, so its channels and properties chain.

arc()VlChartMark

Adds an arc mark to the chart.

A wedge, which with theta is a pie and with innerRadius a donut.

Returns: The new mark, so its channels and properties chain.

label()VlChartMark

Adds a text mark, which draws the value of its text channel.

Returns: The new mark, so its channels and properties chain.

boxplot()VlChartMark

Adds a boxplot mark to the chart.

A box and whiskers, computed from the rows rather than read off them.

Returns: The new mark, so its channels and properties chain.

errorbar()VlChartMark

Adds an error bar: an interval computed from the rows rather than read off them.

extent decides what the interval is — stderr by default, or stdev, ci or iqr.

Returns: The new mark, so its channels and properties chain.

errorband()VlChartMark

Adds an error band: the same interval as an error bar, drawn as a filled region.

Returns: The new mark, so its channels and properties chain.

trail()VlChartMark

Adds a trail mark to the chart.

A line whose width says something: a trail thickens with its size.

Returns: The new mark, so its channels and properties chain.

image()VlChartMark

Adds an image mark to the chart.

A picture per row, placed by its position channels.

Returns: The new mark, so its channels and properties chain.

geoshape()VlChartMark

Adds a geoshape mark to the chart.

A map: the shapes come from the data and the projection places them.

Returns: The new mark, so its channels and properties chain.

latest()VlChartMark

The mark added last, for a caller that built one and let go of it.

A chart with no marks answers a mark belonging to nothing and reports it in errors, rather than quietly adding a point nobody asked for.

Returns: The last mark added.

channel(name:string field:string)VlChart

Sets a channel that every mark on this view inherits.

  • name — The channel name.
  • field — The column name.

Returns: This chart, so calls chain.

x(field:string)VlChart

Position along the horizontal axis.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This view, so channels chain.

y(field:string)VlChart

Position along the vertical axis.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This view, so channels chain.

color(field:string)VlChart

Colour, and the legend that explains it.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This view, so channels chain.

detail(field:string)VlChart

Groups the rows without drawing anything of its own: one line per group, no legend.

Names a COLUMN, never a constant. .color("red") means a column called red; painting a mark red is markColor.

  • field — The column name.

Returns: This view, so channels chain.

encodeJson(channel:string definition:VlJson)VlChart

Sets a whole shared channel from an already-built definition.

  • channel — The channel name.
  • definition — The channel definition.

Returns: This chart, so calls chain.

on(channel:string)VlChart

Moves the cursor back to a shared channel that is already set.

  • channel — The channel name.

Returns: This chart, so calls chain.

type(kind:string)VlChart

States what a shared channel's column holds, when the data cannot say.

  • kindquantitative, nominal, ordinal or temporal.

Returns: This chart, so calls chain.

title(label:string)VlChart

The axis or legend label for the shared cursor channel.

  • label — The label.

Returns: This chart, so calls chain.

timeUnit(unit:string)VlChart

Which part of an instant a shared channel reads.

  • unit — The time unit.

Returns: This chart, so calls chain.

keepOrder()VlChart

Keeps the order the rows arrived in for the shared cursor channel.

Returns: This chart, so calls chain.

size(width:int height:int)VlChart

How big the plotting area is, in pixels.

  • width — The width.
  • height — The height.

Returns: This chart, so calls chain.

width(value:int)VlChart

How wide the plotting area is, in pixels.

  • value — The width.

Returns: This chart, so calls chain.

height(value:int)VlChart

How tall the plotting area is, in pixels.

  • value — The height.

Returns: This chart, so calls chain.

heading(text:string)VlChart

The chart's title, drawn above the plot.

  • text — The title.

Returns: This chart, so calls chain.

background(colour:string)VlChart

The colour behind the plot.

  • colour — A CSS colour.

Returns: This chart, so calls chain.

propJson(key:string value:VlJson)VlChart

Sets any top-level property of the specification.

  • key — The property name.
  • value — The value.

Returns: This chart, so calls chain.

configJson(config:VlJson)VlChart

Merges a configuration block into the specification.

  • config — The configuration object.

Returns: This chart, so calls chain.

filter(expression:string)VlChart

Keeps only the rows an expression accepts.

  • expression — A Vega expression over the row's columns.

Returns: This chart, so calls chain.

calculate(expression:string as:string)VlChart

Adds a column computed from the others.

  • expression — A Vega expression over the row's columns.
  • as — The name of the new column.

Returns: This chart, so calls chain.

transformJson(transform:VlJson)VlChart

Appends an already-built transform.

  • transform — The transform definition.

Returns: This chart, so calls chain.

independent(channel:string)VlChart

Stops the layers sharing one scale on a channel.

Two marks measuring different things up the same side of the plot must not share a scale. This is what makes a Pareto chart — bars against a count, a line against a running percentage — rather than two series averaged into one axis neither of them asked for.

  • channel — The channel to split, usually "y".

Returns: This chart, so calls chain.

toSpec()VlJson

The chart as a Vega-Lite specification.

One mark comes out as a plain specification; several come out as layers, each carrying the shared channels in full — a specification that states everything is one the compiler already handles and one a person can read in a diff.

May be called more than once. Check errors afterwards: a chart that names a column its data does not have is reported here, where Vega-Lite would have drawn an empty axis and said nothing.

Returns: A Vega-Lite specification, ready for VlCompile.

create(data:VlDataset)VlChart

Builds a chart over a dataset.

  • data — The rows the chart draws.

Returns: A chart with no marks yet.

Libraries

vela_chart