0.1.1 • Published 6 years ago

s-chart v0.1.1

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

sChart

simple svg charts with zero dependencies more examples, more png

npm.io npm.io npm.io npm.io

Contents

Installation

  • Install via npm:

    $ npm install s-chart

    and include in your project:

    import Chart from "s-chart"
  • ...or include within your HTML

      <script src="./schart.js"></script>

Usage

const data0 = [
	{
		label: '实例1',
		value: 234
	},
	{
		label: '实例2',
		value: 100
	},
	{
		label: '实例3',
		value: 500
	},
		{
		label: '实例4',
		value: 400
	}
]
const pieChart = new Chart({
	id: 'pie-chart',
	title: 'Pie Chart',
	data: data0,
	type: 'pie', // or 'line', 'scatter', 'pie', 'percentage', 'scatter'
	height: 250,
	width: 640,
	sortDataType: 'descending', // ascending descending none
})

View Examples:

  1. Clone this repo.
  2. cd into project directory.
  3. npm install -g parcel
  4. npm run example

If you want to contribute:

  1. Clone this repo.
  2. cd into project directory
  3. npm install
  4. npm run build

Updates

v0.1.0
  • The very first version out, with pie, percentage, bars, lines and scatter.

License

This repository has been released under the MIT License


Project maintained by facejiong

0.1.1

6 years ago

0.1.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago