Charts & Plugins

Charts, tables, editors, date pickers, calendars, maps and drag-and-drop ship as optional wrapper components under @adminlte/vue/plugins. Each lazy-loads its underlying library and is SSR-safe, so nothing extra lands in your bundle until you actually use it.

How plugin components work

The plugin libraries are declared as optional peer dependencies — install only the ones you need:

# install just what you use
npm install chart.js tabulator-tables quill flatpickr tom-select \
  sortablejs jsvectormap @fullcalendar/core @fullcalendar/daygrid @fullcalendar/interaction

In Nuxt the plugin components are auto-registered. In plain Vue, import them from the /plugins entry point:

import { LteChart, LteDatatable, LteCalendar } from '@adminlte/vue/plugins'

Available plugin components

ComponentWrapsKey props
LteChartChart.jstype, data, options, plugins, height, width, ariaLabel, deepWatch
LteSparklineChartChart.jsdata, type (line/area/bar), color, theme, height, width
LteDatatableTabulatorcolumns, data, options, deepWatch
LteEditorQuillplaceholder, theme, modules, readOnly (+ v-model)
LteFlatpickr / LteTomSelectFlatpickr / Tom Selectplaceholder, options/settings (+ v-model)
LteCalendarFullCalendarevents, initialView, options; emits dateClick, eventClick, eventDrop
LteVectorMapjsVectorMapmap, options, height
LteSortable / LteKanbanSortableJSdraggable list / Kanban board (KanbanColumn, KanbanCard)

Charts (Chart.js)

Charts use Chart.js 4 (MIT). LteChart replaces LteApexChart and takes a standard Chart.js config: type (default line), data ({ labels, datasets }), options, per-chart plugins, height (number = px, default 350), width and aria-label. It loads Chart.js in onMounted, resizes with its container, destroys the instance on unmount, and exposes getChart() for the live Chart.js instance.

<script setup lang="ts">
import { LteChart, areaGradient } from '@adminlte/vue/plugins' // components are auto-registered in Nuxt

const data = {
  labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
  datasets: [
    {
      label: 'Revenue',
      data: [31, 40, 28, 51, 42, 109, 100],
      borderColor: '#0d6efd',
      backgroundColor: areaGradient('#0d6efd'),
      fill: 'start',
    },
  ],
}
const options = { plugins: { legend: { display: false } } }
</script>

<template>
  <LteCard title="Revenue">
    <LteChart type="line" :data="data" :options="options" :height="300" aria-label="Monthly revenue" />
  </LteCard>
</template>

options is merged over { responsive: true, maintainAspectRatio: false } and watched deeply. data is watched shallowly by default — replace the object immutably to trigger an update, or set deep-watch for in-place mutations. Both are copied before they reach Chart.js, so your reactive state is never written to. An area chart is type="line" with fill: 'start'; use "bar" (add indexAxis: 'y' for horizontal), "doughnut" (with options.cutout), "pie", "radar" or "polarArea" for the rest. Changing type or plugins rebuilds the chart.

LteSparklineChart draws an axis-less trend line: data (numbers), type (area by default, line or bar), color (any CSS colour, including var(--bs-…)) or theme (a Bootstrap colour name, default primary), height (default 60) and width.

Theme preset and dark mode

One theme preset (chart-theme.ts in the package) writes Chart.defaults from the Bootstrap CSS variables on <html>: font, text, gridline, tooltip and legend colours, subtle horizontal gridlines only, rounded bars, smooth lines, point-style legends, and the Bootstrap palette (primary, teal, warning, …) for datasets that set no colour. Charts re-theme live when data-bs-theme changes on <html>, and dir="rtl" flips legends and tooltips. The helpers are exported from @adminlte/vue/plugins: areaGradient(color) (the faded area fill), withAlpha, resolveColor and cssVar (canvas cannot read var(--…) directly), plus applyChartTheme, readChartTheme and subscribeChartTheme. To style a chart you build with Chart.js directly, call the preset in the browser first:

import { Chart, registerables } from 'chart.js'
import { applyChartTheme } from '@adminlte/vue/plugins'

// browser only — e.g. inside onMounted
Chart.register(...registerables)
applyChartTheme(Chart)

Chart.js plugins

Pass inline plugin objects for one chart through the plugins prop, or register a plugin globally once with Chart.register() from chart.js (browser only):

<script setup lang="ts">
import type { Plugin } from 'chart.js'

const centerText: Plugin = {
  id: 'centerText',
  afterDraw(chart) {
    const { ctx, chartArea } = chart
    ctx.save()
    ctx.textAlign = 'center'
    ctx.fillText('72%', (chartArea.left + chartArea.right) / 2, (chartArea.top + chartArea.bottom) / 2)
    ctx.restore()
  },
}
const plugins = [centerText] // keep the array stable: a new plugins array rebuilds the chart
const data = { labels: ['Used', 'Free'], datasets: [{ data: [72, 28] }] }
</script>

<template>
  <LteChart type="doughnut" :data="data" :plugins="plugins" />
</template>

FullCalendar

<script setup lang="ts">
import { LteCalendar } from '@adminlte/vue/plugins'

const events = [{ title: 'Launch', date: '2026-07-01' }]
</script>

<template>
  <LteCalendar
    :events="events"
    initial-view="dayGridMonth"
    @event-click="(arg) => console.log(arg.event.title)"
  />
</template>

Tabulator data table

<script setup lang="ts">
import { LteDatatable } from '@adminlte/vue/plugins'

const columns = [{ title: 'Name', field: 'name' }, { title: 'Age', field: 'age' }]
const rows = [{ name: 'Ada', age: 36 }, { name: 'Linus', age: 54 }]
</script>

<template>
  <LteDatatable :columns="columns" :data="rows" />
</template>

Drag-and-drop is also exposed as the useSortable(el, opts) composable, which initialises SortableJS on a template ref (lazy-loaded). The full, copy-paste plugin pages — charts, tables, calendar, kanban, theme generator — live in the live demo.


AdminLTE 4 · Vue port Edit on GitHub