@enso-ui/charts
Charts
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
Chartcomponent plus the shared color palette - ships higher-level Bulma presenters such as
ChartCardandEnsoChartCardfor 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: objectchart labels and datasets.display: functiondatalabel visibility strategy.shortNumbers: boolean = falseenables short number formatting.valueFormatter: functionvalue formatter for datalabels.scaleFormatter: functioncallback used to mutate scale config.options: object = {}chart options override.type: stringone ofline,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
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.jschartjs-plugin-annotationchartjs-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
Related Packages
Idiomatic Vue chart component — one Rozie source compiled to Vue wrapping Chart....
This library is the Vue and Typescript charts component library. Install
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 5.0.15 | ^3.5.0 | MIT | |
| 5.0.14 | ^3.5.0 | MIT | |
| 5.0.12 | ^3.5.0 | MIT | |
| 5.0.11 | ^3.5.0 | MIT | |
| 5.0.10 | ^3.5.0 | MIT | |
| 5.0.9 | ^3.5.0 | MIT | |
| 5.0.8 | ^3.5.0 | MIT | |
| 5.0.6 | ^3.5.0 | MIT | |
| 5.0.5 | ^3.5.0 | MIT | |
| 5.0.4 | ^3.5.0 | MIT | |
| 5.0.3 | ^3.5.0 | MIT | |
| 5.0.2 | ^3.5.0 | MIT | |
| 5.0.1 | ^3.0 | MIT | |
| 5.0.0 | ^3.0 | MIT | |
| 4.0.1 | ^3.0 | ISC | |
| 4.0.0 | ^3.0 | ISC | |
| 3.0.14 | ^3.0 | ISC | |
| 3.0.13 | ^3.0 | ISC | |
| 3.0.12 | ^3.0 | ISC | |
| 3.0.11 | ^3.0 | ISC | |
| 3.0.10 | ^3.0 | ISC | |
| 3.0.9 | ^3.0 | ISC | |
| 3.0.8 | ^3.0 | ISC | |
| 3.0.7 | ^3.0 | ISC | |
| 3.0.6 | ^3.0 | ISC | |
| 3.0.5 | ^3.0 | ISC | |
| 3.0.4 | ^3.0 | ISC | |
| 3.0.3 | ^3.0 | ISC | |
| 3.0.2 | ^3.0 | ISC | |
| 3.0.1 | ^3.0 | ISC |
Showing the latest 30 of 99. See every release on npm