npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@adyen/lume-vue3

v1.10.0

Published

Lume is a Vue data visualization component library, built with Typescript and D3.

Downloads

256

Readme

Lume

PR workflow MIT License Netlify Status

Lume is a combination of a set of design guidelines for creating data visualizations that tell stories, and a component library that implements them, built for Vue applications.

Note: Lume ships two packages - one that is compatible with Vue 2.7, and another, with Vue 3. The second is published as @adyen/lume-vue3. Our examples import the Vue 2.7-compatible version, but if you're using Vue 3, just update the import name.

Design guidelines (Website)

About

What's different about Lume

🧑‍🎨 Backed by strong data visualization design principles, guidelines and patterns
🖼️ Leverages Vue for SVG rendering and reactivity
📦 Available for both Vue 2.7 and 3

Stack

Dependencies

Dev stack

Getting started

Installation

To install Lume, run the following command:

Vue 2.7+

$ npm install @adyen/lume

Vue 3

$ npm install @adyen/lume-vue3

Components

You can import Lume components to your Vue app:

// SFC <script type="ts">

import { defineComponent } from 'vue';
import { LumeBarChart } from '@adyen/lume';

export default defineComponent({
  components: { LumeBarChart },
  ...
});
// Composition <script setup type="ts">

import { LumeBarChart } from '@adyen/lume';

Plugin

You can also import Lume as a Vue plugin that you install in your global Vue setup:

import Vue from 'vue';
import LumePlugin from '@adyen/lume/plugin';

import App from './my-app.vue';

Vue.use(LumePlugin);

const app = new Vue(App).$mount('#root');

Styles

For Lume to render as intended, you also need to import its styles.

CSS (global)

// app/index/main.ts
import Vue from 'vue';
import App from './my-app.vue';

// Main styles
import '@adyen/lume/styles';
// (Optional) Lume font
import '@adyen/lume/font';

const app = new Vue(App).$mount('#root');

Sass (global)

// app/index/main.ts
import Vue from 'vue';
import App from './my-app.vue';

// Main styles
import '@adyen/lume/scss';
// (Optional) Lume font
import '@adyen/lume/font';

const app = new Vue(App).$mount('#root');

CSS (SFC)

<template>...</template>

<script>
...
</script>

<!-- Main styles -->
<style src="@adyen/lume/styles"></style>
<!-- (Optional) Lume font -->
<style src="@adyen/lume/font"></style>

Sass (SFC)

<template>...</template>

<script>
...
</script>

<!-- Main styles -->
<style lang="scss" src="@adyen/lume/scss"></style>
<!-- (Optional) Lume font -->
<style src="@adyen/lume/font"></style>

Sass (with overrides)

<template>...</template>

<script>
...
</script>

<!-- Main styles -->
<style lang="scss">
@use '@adyen/lume/scss' with (
  $lume-font-family: 'Times New Roman'
);
</style>

Development

You can clone this repo and use pnpm to install dependencies. We use Storybook to develop our features.

Docker

To run the app inside a Docker container:

  1. Create a .env file with your Docker image URL:
      $ echo DOCKER_IMAGE={YOUR_IMAGE_HERE} >> .env
  2. Start your container:
      $ docker compose up -d
  3. Attach to it in your terminal:
      $ docker attach lume
  4. Install pnpm:
      $ npm i -g pnpm
  5. (Optional, depends on your Docker image) Add the npm global directory to the PATH variable:
      $ export PATH="${PATH}:/root/local/bin"

About Vue versions

Lume ships two packages, one for each Vue version (2 and 3).

Development is done in Vue 3, keeping in mind that the same source code must work the same way on both Vue versions, so some of the new Vue 3 APIs are restricted, unless provided with a fallback.

Storybook

Storybook is available by running the following command:

$ pnpm run storybook

Every chart component should have its own .stories file, and it will be automatically loaded onto the Storybook manager.

Available addons

Releasing

To generate a release:

  1. Create a release branch and push it as upstream:
      $ git checkout -b release-[VERSION] && git push -u origin release-[VERSION]
  2. Run the release command:
      $ npm run release
  3. Create a PR for the release branch.
  4. After it's merged, publish the GitHub release. This will then publish the new release in NPM.

This will prompt you with an interactive CLI to create a new version, tag, changelog entry and release.

Roadmap

| Feature | Status | | ----------------------------------------- | ------ | | Charts | | | Alluvial (sankey) diagram | ✅ | | Single bar chart | ✅ | | Grouped bar chart | ✅ | | Stacked bar chart | ✅ | | Horizontal orientation for all bar charts | ✅ | | Line chart | ✅ | | Sparkline chart | ✅ | | Features | | | A11y colors | 🚧 | | A11y guidelines & impl. | ❌ | | Dark theme | ❌ | | Select dataset in legend | ❌ |

✅ - Done
🚧 - WIP
❌ - To do

Contacts

Maintainers

Contributors