• Stars
    star
    235
  • Rank 171,079 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

VueJS component wrapping Morris.js

vue-morris

Vue.js components wrapping Morris.js lib

See http://morrisjs.github.io/morris.js/ for documentation

Depends on Vue.js v2.1.0+

Install

Use npm

npm install vue-morris --save

Do not forget to declare jQuery in your package.json and, if you are using Webpack, you should have something like that in your webpack.config.js

resolve: {
    alias: {
      'vue$': 'vue/dist/vue.common.js',
      'jquery': 'jquery/src/jquery.js'
    }
  },

Examples

For a complete example, see files in examples directory or the project: https://github.com/bbonnin/vue-morris-example.

  • Import the component
// Do not forget to import raphael
import Raphael from 'raphael/raphael'
global.Raphael = Raphael

import Vue from 'vue'
import { DonutChart } from 'vue-morris'

new Vue({
  el: '#app',

  data: {
    donutData: [
      { label: 'Red', value: 300 },
      { label: 'Blue', value: 50 },
      { label: 'Yellow', value: 100 }
    ],

    components: {
    DonutChart, BarChart, LineChart, AreaChart
  }
})
  • Use the component in html
<donut-chart 
  id="donut" 
  :data="donutData" 
  colors='[ "#FF6384", "#36A2EB", "#FFCE56" ]' 
  resize="true">
</donut-chart>
  • Bar chart bar chart

  • Line chart line chart

  • Area chart area chart

  • Donut chart donut chart

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

More Repositories

1

pulsar-express

Simple Web Interface for Apache Pulsar
Vue
106
star
2

zeppelin-mongodb-interpreter

MongoDB interpreter for Apache Zeppelin
Java
48
star
3

mongo2arango

Tool for copying data from MongoDB to ArangoDB
Java
21
star
4

docker-hadoop-3

Docker file for Hadoop 3
Shell
19
star
5

conference-slides

Conference slides
13
star
6

zeppelin-arangodb-interpreter

ArangoDB interpreter for Apache Zeppelin
Java
12
star
7

vue-morris-example

How to use vue-morris
Vue
8
star
8

mongo2els

Tool for copying data from MongoDB to Elasticsearch
Java
7
star
9

hadoop-mongodb

How to query MongoDB with SQL.
Java
5
star
10

foundationdb-examples

Various FoundationDB examples
CSS
4
star
11

quizz-nantes

JavaScript
4
star
12

pulsar-io-mongo

MongoDB Sink for Apache Pulsar
Java
3
star
13

talk-intro-apache-pulsar

Python
3
star
14

rpulsar

R client for Apache Pulsar
R
3
star
15

graalvm-examples

GraalVM examples (Java+R, reflection, ...)
Java
3
star
16

template-spring-boot-nuxt

Template for a project with Spring Boot for the services and Nuxt for the frontend
Vue
2
star
17

talk-stream-processing-et-sql

Support pour un talk sur le stream processing avec SQL
2
star
18

pizza-angular

Angular directive for Zurb Pizza Pie Charts
JavaScript
2
star
19

breizhcamp2017-vuejs

TIA BreizhCamp 2017 - Vue, mΓͺme un dev Java peut en faire !
JavaScript
2
star
20

MUG-Nantes-Demo-Hadoop

Demo connecteur MongoDB pour Hadoop
Java
1
star
21

h

Simple CLI to query HTTP endpoints
JavaScript
1
star
22

zeppelin-elasticsearch-interpreter

Elasticsearch Interpreter for Appache Zeppelin
Java
1
star
23

datachart

From CSV to a nice chart in a few seconds !
JavaScript
1
star
24

saagie-cli

CLI tool for Saagie Open DataFabric
JavaScript
1
star
25

webrtc

Basic example of WebRTC (with video calls)
JavaScript
1
star
26

medium-nuxt-morris

Source code for an article on medium
Vue
1
star
27

docker-openrefine

Docker image for OpenRefine
Shell
1
star
28

videoshare

Complete example of "Javascript Everywhere"
JavaScript
1
star
29

travel-assistant

Example of using the langchain4j library
Java
1
star
30

camel-arangodb

Camel ArangoDB Component
Java
1
star