Giter VIP home page Giter VIP logo

pure-vue-chart's Introduction

Synopsis

This is just my personal website built in react, react-router, and foundation css.

Example

https://djaxho.github.io/djaxho

Installation

If you want to try it out, perhaps for some examples of react and react-router usage, Clone the repo, npm install, then 'npm start' to run a reload server, then when you want to built a production version run 'npm run build'

License

Feel free to use it for whatever you want :)

pure-vue-chart's People

Contributors

djaxho avatar escalantef avatar rechousa avatar taliescript 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

Watchers

 avatar  avatar  avatar  avatar

pure-vue-chart's Issues

Pure Vue chart does not work with Nuxt in SSR mode

When tried with Nuxt is SSR mode. I get

document is not defined

more details

`node_modules/pure-vue-chart/dist/pure-vue-chart.common.js:3624:22
line3624 : var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')

`

Update points prop in type of object list not work

if prop points is type of object list, then update its value will break the chart.
points=[{label: 'N', value: 41.1}, {label: 'NW', value: 1}, {label: 'W', value: 15}]
It seem that component will take the object (eg. {label: 'N', value: 41.1}) as the height value.

I tested some small change and it worked well:

    chartData() {
      return this.staticDataPoints.map((dataPoint, index) => ({
        valueNotInMotion: this.tweenedDataPoints[index],
        index,
        partitionWidth: this.partitionWidth,
        midPoint: this.partitionWidth / 2,
        x: index * this.partitionWidth,
        xMidpoint: index * this.partitionWidth + this.partitionWidth / 2,
        yOffset: this.innerChartHeight - this.y(this.tweenedDataPoints[index].value),
        height: this.y(this.tweenedDataPoints[index].value),
      }))
    }

[Vue3] Error: Cannot read property '_c' of undefined

Tried to use pure-vue-chart with Vue3. It gives a bunch of warnings and then the error:

Uncaught (in promise) TypeError: Cannot read property '_c' of undefined
    at Proxy.render (pure-vue-chart.common.js?7769:5088)
    at renderComponentRoot (runtime-core.esm-bundler.js?5c40:696)
    at componentEffect (runtime-core.esm-bundler.js?5c40:4035)
    at reactiveEffect (reactivity.esm-bundler.js?a1e9:42)
    at effect (reactivity.esm-bundler.js?a1e9:17)
    at setupRenderEffect (runtime-core.esm-bundler.js?5c40:4018)
    at mountComponent (runtime-core.esm-bundler.js?5c40:3976)
    at processComponent (runtime-core.esm-bundler.js?5c40:3936)
    at patch (runtime-core.esm-bundler.js?5c40:3547)
    at mountChildren (runtime-core.esm-bundler.js?5c40:3736)

Crashes when going from a larger set of points to a lower one

I bond the points prop to a computed value that returns the array of points to display. When I go from a larger set of points to a lower one, the chart component crashes with the following error:

[Vue warn]: Error in render: "TypeError: _this3.dataColors[index] is undefined"

found in

---> <VueBarGraph>
       <Chart>
         <App> at src/App.vue
           <Root> vue.runtime.esm.js:619
    VueJS 18
    _callee2$ chart.vue:45
    Babel 10
    _callee$ chart.vue:32
    Babel 8
    _callee$ App.vue:42
    Babel 8
    keyup App.vue:38
    VueJS 3

TypeError: _this3.dataColors[index] is undefined
    chartData vue-bar-graph.common.js:7663
    chartData vue-bar-graph.common.js:7651
    VueJS 3
    render vue-bar-graph.common.js:3291
    VueJS 14
    _callee2$ chart.vue:45
    Babel 10
    _callee$ chart.vue:32
    Babel 8
    _callee$ App.vue:42
    Babel 8
    keyup App.vue:38
    VueJS 3
vue.runtime.esm.js:1897
    VueJS 17
    _callee2$ chart.vue:45
    Babel 10
    _callee$ chart.vue:32
    Babel 8
    _callee$ App.vue:42
    Babel 8
    keyup App.vue:38
    VueJS 3

To reproduce: display dynamically a set of n points, then change the cardinality of the set (simply removing some values) to m (m<n)

Add an 'expected' chart

This should allow showing a chart of historical, or planned data (such as budget goals)
And should be able to sow an additional chart showing where the data currently sits.
This will be a good place to use percentages also

color prop

is there a way, a color prop can be added for better customization of the chart?

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.