Area

There is no type area. A filled line is type line with mark.area. Several series that add up are stacked-area.

Import@chartkitdev/core/charts/lineBundle@chartkitdev/core/allSpec typelineFamilyCore

Examples · Open in playground

Spec

Filled line. The spec type is line, with mark.area.

spec.json200 · valid
React
npm install @chartkitdev/core
npm install @chartkitdev/react

import { Chart } from "@chartkitdev/react";

export function Panel() {
  return <Chart spec={spec} />;
}
Vanilla
npm install @chartkitdev/core
npm install @chartkitdev/vanilla

import { mount } from "@chartkitdev/vanilla";

const chart = mount(document.querySelector("#chart"), spec);
chart.update(spec);
Vue
npm install @chartkitdev/core
npm install @chartkitdev/vue

<script setup>
import { Chart } from "@chartkitdev/vue";
</script>

<template>
  <Chart :spec="spec" />
</template>
Svelte
npm install @chartkitdev/core
npm install @chartkitdev/svelte

<script>
  import { Chart } from "@chartkitdev/svelte";
</script>

<Chart {spec} />
Astro
npm install @chartkitdev/core
npm install @chartkitdev/astro

---
import { Chart } from "@chartkitdev/astro";
---

<Chart spec={spec} />
Solid
npm install @chartkitdev/core
npm install @chartkitdev/solid

import { Chart } from "@chartkitdev/solid";

export function Panel() {
  return <Chart spec={spec} />;
}
Qwik
npm install @chartkitdev/core
npm install @chartkitdev/qwik

import { component$ } from "@builder.io/qwik";
import { Chart } from "@chartkitdev/qwik";

export const Panel = component$(() => {
  return <Chart spec={spec} />;
});
Angular
npm install @chartkitdev/core
npm install @chartkitdev/angular

import { Component } from "@angular/core";
import { Chart } from "@chartkitdev/angular";

@Component({
  standalone: true,
  imports: [Chart],
  template: `<ck-chart [spec]="spec" />`,
})
export class Panel {
  spec = spec;
}
Custom element
npm install @chartkitdev/core
npm install @chartkitdev/element

import "@chartkitdev/element";

const chart = document.querySelector("chart-kit");
chart.spec = spec;

Anatomy

  1. The spec on this page is type line with mark.area true.
  2. encoding.y.area fills one channel and leaves the others as lines.
  3. stacked-area is the chart for parts of a whole over an ordered x.

Options that apply

PathRoleStatus
The spec on this page is type line with mark.area true.Current docsin the library
encoding.y.area fills one channel and leaves the others as lines.Current docsin the library
stacked-area is the chart for parts of a whole over an ordered x.Current docsin the library

Not a separate type

The v1 schema has line and stacked-area. It does not have area. This URL is the docs-nav name for a filled line.

Examples

A filled line is type: "line" with mark.area. Worked examples are on Line and Stacked area.

Encoding · Theming · Gallery