You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.8 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <div align="center">
  2. <img src=".github/logo.png" height="256">
  3. <h2>Frappé Charts</h2>
  4. <p align="center">
  5. <h3>A <b>zero-dependency</b> GitHub-inspired modern, intuitive and responsive charting library</h3>
  6. <a href="https://frappe.github.io/charts">
  7. Explore the Demos »
  8. </a>
  9. </p>
  10. </div>
  11. <p align="center">
  12. <a href="https://www.npmjs.com/package/frappe-charts">
  13. <img src="https://img.shields.io/npm/v/frappe-charts.svg?maxAge=2592000">
  14. </a>
  15. <a href="https://www.npmjs.com/package/frappe-charts">
  16. <img src="https://img.shields.io/npm/dm/frappe-charts.svg?maxAge=2592000">
  17. </a>
  18. <a href="https://www.npmjs.com/package/frappe-charts">
  19. <img src="https://img.shields.io/npm/dt/frappe-charts.svg?maxAge=2592000">
  20. </a>
  21. <a href="http://github.com/frappe/charts/tree/master/dist/js/frappe-charts.min.js">
  22. <img src="http://img.badgesize.io/frappe/charts/master/dist/js/frappe-charts.min.js?compression=gzip&label=size">
  23. </a>
  24. <a href="https://saythanks.io/to/frappe">
  25. <img src="https://img.shields.io/badge/Say%20Thanks-🦉-1EAEDB.svg?style=flat-square">
  26. </a>
  27. <a href="https://paypal.me/erpnext">
  28. <img src="https://img.shields.io/badge/donate-💵-f44336.svg?style=flat-square">
  29. </a>
  30. </p>
  31. <p align="center">
  32. <a href="https://frappe.github.io/charts">
  33. <img src=".github/example.gif" height="300">
  34. </a>
  35. </p>
  36. ### Table of Contents
  37. * [Installation](#installation)
  38. * [Usage](#usage)
  39. * [License](#license)
  40. #### Installation
  41. * Install via [`npm`](https://www.npmjs.com/get-npm):
  42. ```console
  43. $ npm install frappe-charts
  44. ```
  45. * ... or include in your HTML
  46. ```html
  47. <script src="https://raw.githubusercontent.com/frappe/charts/master/dist/frappe-charts.min.js"></script>
  48. ```
  49. ### Usage
  50. ```js
  51. const data = {
  52. labels: ["12 A.M. - 3 A.M.", "3 A.M. - 6 P.M.", "6 A.M. - 9 A.M",
  53. "9 A.M. - 12 A.M.", "12 P.M. - 3 P.M.", "3 P.M. - 6 P.M.",
  54. "6 P.M. - 9 P.M.", "9 A.M. - 12 A.M."
  55. ],
  56. datasets: [
  57. {
  58. title: "Some Data",
  59. color: "light-blue",
  60. values: [25, 40, 30, 35, 8, 52, 17, -4]
  61. },
  62. {
  63. title: "Another Set",
  64. color: "violet",
  65. values: [25, 50, -10, 15, 18, 32, 27, 14]
  66. }
  67. ]
  68. }
  69. const chart = new Chart({
  70. parent: '#chart',
  71. title: "My Awesome Chart",
  72. data: data,
  73. type: 'bar', // or 'line', 'scatter', 'percentage'
  74. height: 250
  75. })
  76. ```
  77. If you want to contribute:
  78. 1. Clone this repo.
  79. 2. `cd` into project directory
  80. 3. `npm install`
  81. 4. `npm run dev`
  82. #### License
  83. This repository has been released under the [MIT License](LICENSE)
  84. ------------------
  85. Made with ♥ by [pratu16x7](https://github.com/pratu16x7). Project maintained by [frappe](https://github.com/frappe)