GithubHelp home page GithubHelp logo

peity's Issues

Update colors

The value of the pie chart updates properly but the color does not. Any way to force a redraw?

  data () {
    return {
      data: '100/100',
      fillColor: 'green'
    }
  },
  mounted() {
    setTimeout(() => {
      this.data = '50/100'
      this.fillColor = 'red'
    }, 1000);
  },

When hiding and re-displaying, Peity is recreated and adds an additional chart.

I have Peity hosted inside another component that gets filtered based on data. if it is filtered and then unhidden, the chart will be duplicated since the dom is recreated.

Current fix is to empty the innerHtml of the container:

mounted() {
      
      this.$el.parentNode.innerHtml = "";
      
      this.chart = new Peity(this.$el, this.type, this.data, this.options)
      this.chart.draw()
},

Error when try to build

Hi, I'm trying to build the lib but I'm getting this error:

> yarn build
yarn build v0.16.1
$ webpack -p --config build/webpack.min.conf.js
Hash: e2415a0aae97a1e511bb
Version: webpack 1.14.0
Time: 1823ms
           Asset     Size  Chunks             Chunk Names
vue-peity.min.js  12.3 kB       0  [emitted]  main
    + 7 hidden modules

ERROR in vue-peity.min.js from UglifyJs
SyntaxError: Unexpected token punc «(», expected punc «:» [./src/lib/bar.js:14,0]

ERROR in vue-peity.min.js from UglifyJs
SyntaxError: Unexpected token punc «(», expected punc «:» [./src/lib/bar.js:14,0]

The same occurs running the build with -> npm run-script build

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.