Giter VIP home page Giter VIP logo

chartjs's Introduction

vue-bulma

A modern UI framework based on Vue and Bulma.

Install

Install with npm:

$ npm i vue-bulma --save

Install with yarn:

$ yarn add vue-bulma

Example

import Vue from 'vue'
import * as components from 'vue-bulma'

// In the global registration
for (const [key, value] of Object.entries(components)) {
  const name = value.name || `vb-${key.toLowerCase()}`
  Vue.component(name, value)
}

Development

We use Lerna to manage multiple packages.

$ npm i lerna --global 
$ yarn bootstrap

Open Examples

$ yarn dev

Format packages

$ yarn run format

Create a package

# vue-bulma-container
$ lerna create vue-bulma-container
$ lerna add vue packages/vue-bulma-container/
$ lerna add bulma packages/vue-bulma-container/
$ cd packages/vue-bulma-container/
$ mkdir src
$ touch src/main.js
$ touch src/style.scss

Add to vue-bulma

$ lerna add vue-bulma-container packages/vue-bulma/

Team

Lead Maintainers

Collaborators

License

Licensed under MIT.

chartjs's People

Contributors

fundon avatar luventa avatar redlucas avatar ruimgoncalves avatar stepsame avatar swhgoon avatar wilk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chartjs's Issues

update chart.js

Please update chart.js to 2.7 so new data format data: [{x:'2016-12-25', y:20}, {x:'2016-12-26', y:10}] can be used with bar charts too.

Data array not passing into chart prop

I have an axios response in the parent component. I can see it via Vue Dev Tools. No problems there. But, the chart child component show Array[0] . Any strings that are passed through the chart props (borderColor etc) DOES go to the chart child. If I hard code data array values, they DO show up.

What am I missing?

Issue more current release

Hey there!

Nice project, I greatly appreciate the Vue 2 support!
However, can you please release a more current version than 1.0.0, so it's installable via npm?

Thanks a lot!

How to redraw a chart?

My piechart uses data from the AJAX request, so the data comes after the chart is drawn. How can I redraw the chart based on the new data or make my piechart redraw automatically?

Module not found: Error: Can't resolve 'scss-loader'

I just use npm install vue-bulma-chartjs and got some errors

ERROR in ./~/vue-bulma-chartjs/src/Chartjs.vue
Module not found: Error: Can't resolve 'scss-loader' in '/Library/WebServer/Documents/vue/node_modules/vue-bulma-chartjs/src'
 @ ./~/vue-bulma-chartjs/src/Chartjs.vue 5:0-159
 @ ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
 @ ./src/App.vue
 @ ./src/main.js
 @ multi main

please use css loader

just for 3 lines of code it use scss loader which cannot be installed successfully via npm with node v8.9.4, please save us time using pure css-loader

<style lang="scss">
  canvas.chartjs {
    max-width: 100%;
  }
</style>

No chart rending...

It seems npm install vue-bulma-chartjs installs an version for vue 1.x
so I modify my package.json > dependencies like this:
"vue-bulma-chartjs": "git+https://github.com/vue-bulma/chartjs.git"
And run npm install vue-bulma-chartjs

Problem solved.

Chart do not update

When I change the datasets send to Chartjs.vue, the Chart do not refresh.
It run the this.chart.update() line but that do nothing.

Thanks.

"non-passive event listener" warning in console

I am getting this warning in the console :
[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
Seems to be related to an outdated version of chart.js

Chart.js is not reactive when data chagne

Example: https://codesandbox.io/s/5mrzwp5q4p

In above example, when click on Change Data, data is changed but it's not updated in chart

<template>
  <div id="app">
    <button @click="changeData">Change Data</button>
    <chart :type="'pie'" :data="data" :options="options"></chart>
  </div>
</template>

<script>
import Chart from "./components/Chart.vue";

export default {
  name: "App",
  components: {
    Chart
  },
  data() {
    return {
      data: {
        labels: ["Sleeping", "Designing", "Coding", "Cycling"],
        datasets: [
          {
            data: [20, 40, 5, 35],
            backgroundColor: [
              "#1fc8db",
              "#fce473",
              "#42afe3",
              "#ed6c63",
              "#97cd76"
            ]
          }
        ]
      },
      options: {
        segmentShowStroke: false
      }
    };
  },
  methods: {
    changeData() {
      this.data = {
        labels: ["Sleeping", "Designing", "Coding", "Cycling"],
        datasets: [
          {
            data: [1, 2, 3, 4],
            backgroundColor: [
              "#1fc8db",
              "#fce473",
              "#42afe3",
              "#ed6c63",
              "#97cd76"
            ]
          }
        ]
      };
    }
  }
};
</script>

Especially, when data came from computed properties, chart will not be updated.
https://stackoverflow.com/q/50419627/2303610

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.