luna-chart
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Luna Chart

HTML5 charts.

Demo

https://luna.liriliri.io/?path=/story/chart

Install

Add the following script and style to your page.

<script src="//cdn.jsdelivr.net/npm/luna-chart/luna-chart.js"></script>

You can also get it on npm.

npm install luna-chart --save
import LunaChart from 'luna-editor'

Usage

const container = document.getElementById('container')
const barChart = new Chart(container, {
  type: 'bar',
  bgColor: '#fbfbfb',
  title: {
      text: 'Bar Chart',
  },
  data: {
    labels: ['Monday', 'TuesDay', 'Wednesday', 'Thursday', 'Friday'],
    datasets: [
      {
        label: 'Dataset 1',
        bgColor: '#e73c5e',
        data: [128, 146, 56, 84, 222],
      },
      {
        label: '#614d82',
        bgColor: '#614d82',
        data: [119, 23, 98, 67, 88],
      },
    ],
  },
})

Readme

Keywords

Package Sidebar

Install

npm i luna-chart

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

186 kB

Total Files

22

Last publish

Collaborators

  • surunzi