0.1.0 • Published 4 years ago

luna-chart v0.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

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],
      },
    ],
  },
})
0.1.0

4 years ago