Laravel EnsoLaravel Enso
Guide
Back End
Front End
GitHub
Guide
Back End
Front End
GitHub
  • Front End

    • Accessories
    • Addresses
    • Algolia
    • Audits
    • Auth
    • Bookmarks
    • Calendar
    • Card
    • Cargo Partner
    • Categories
    • Charts
    • Checkbox
    • Clipboard
    • Comments
    • Commercial
    • Companies
    • Confirmation
    • Currencies
    • Data Import
    • Date
    • Datepicker
    • Directives
    • Discounts
    • Divider
    • Documents
    • Dropdown
    • Dropdown Indicator
    • Eav
    • Emag
    • Emails
    • Enums
    • ERD
    • Facebook
    • Files
    • Filters
    • Financials
    • Forms
    • Frisbo
    • Google
    • Holidays
    • How to
    • Interactions
    • Inventory
    • IO
    • Laravel Validation
    • Loader
    • Localisation
    • Logs
    • Measurement Units
    • Meili Search
    • Menus
    • Mixins
    • Modal
    • Money
    • Monitored Emails
    • Notifications
    • Orderable Trees
    • Packaging Units
    • Pagination
    • People
    • Permissions
    • Product Lots
    • Products
    • Progress Bar
    • Progress Circle
    • Progress Indicator
    • Questionnaires
    • Quick View
    • Range Slider
    • Rating
    • Roles
    • Route Mapper
    • Sale Channels
    • Scroll to Top
    • Search Mode
    • Select
    • Sentry
    • Services
    • Smart Bill
    • SMS Advert
    • Strings
    • Switch
    • Tables
    • Tabs
    • Tasks
    • Teams
    • Textarea
    • Themes
    • Ticketing
    • Toastr
    • Transitions
    • Tree View
    • Tutorials
    • Typeahead
    • Typesense
    • UI
    • Uploader
    • UPS
    • User Groups
    • Users
    • Virtual Call Center
    • Vouchers
    • Webshop
    • WYSIWYG

Charts

LicenseStableDownloadsVueJavaScriptSCSSnpmIssuesMerge Requests

Description

Chart.js wrappers and chart card presenters for Enso UI.

Installation

Install the package:

yarn add @enso-ui/charts

This package is also available through the full enso-ui workspace bundle.

Features

  • exports the low-level Chart component plus the shared color palette
  • ships higher-level Bulma presenters such as ChartCard and EnsoChartCard for Enso dashboards
  • registers Chart.js plugins for data labels and annotations out of the box
  • supports runtime option mutation, dataset updates, SVG export, and responsive resizing

Usage

<script setup>
import { Chart, colors } from '@enso-ui/charts';

const data = {
    labels: ['Jan', 'Feb', 'Mar'],
    datasets: [{ label: 'Orders', data: [3, 7, 5], backgroundColor: colors.slice(0, 3) }],
};
</script>

<Chart type="bar" :data="data" />

API

Chart

Low-level Chart.js canvas wrapper.

Import: @enso-ui/charts

Props:

  • data: object chart labels and datasets.
  • display: function datalabel visibility strategy.
  • shortNumbers: boolean = false enables short number formatting.
  • valueFormatter: function value formatter for datalabels.
  • scaleFormatter: function callback used to mutate scale config.
  • options: object = {} chart options override.
  • type: string one of line, bar, horizontalBar, radar, polarArea, pie, doughnut, bubble.

Methods:

  • resize()
  • svg()
  • update()

colors

Default export palette array used by charts and cards.

Import: @enso-ui/charts

ChartCard

Bulma card wrapper around Chart that fetches its config from an HTTP source.

Import: @enso-ui/charts/src/bulma/ChartCard.vue

EnsoChartCard

Chart card variant wired to injected Enso i18n and errorHandler helpers.

Import: @enso-ui/charts/src/bulma/EnsoChartCard.vue

Companion Backend Package

  • laravel-enso/charts ↗

The backend companion usually provides the HTTP endpoints and chart payloads consumed by ChartCard and EnsoChartCard.

Depends On

  • @enso-ui/card ↗
  • @enso-ui/directives ↗
  • @enso-ui/mixins ↗
  • chart.js
  • chartjs-plugin-annotation
  • chartjs-plugin-datalabels

Contributions

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

License

MIT

Edit this page on GitHub
Last Updated: 4/21/2026, 6:47:06 AM
Prev
Categories
Next
Checkbox