Commit Graph

14 Commits

Author SHA1 Message Date
Jakub Juszczak
39ff839d92 fix(mixins): Check for chartjs instance before rendering chart
Closes #288
2018-01-12 13:13:46 +01:00
Jakub
d498b7c8cf Feature/v3 (#225)
* Remove Vue dependency and change extends

Signed-off-by: Jakub Juszczak <netghost03@gmail.com>

* 💎 Release new version 3.0.0-rc0

* ⬆️ Update examples

* 📝 Update README.md

* ⬆️ Update examples

* ⬆️ Update englishd docs

* ⬆️ Update transalted docs with current code examples

* 🔥 Remove dist files from gitignore

* ⬆️ Update dependencies vue and chartjs

* Change private data

Implements #182. The private chart instance is now in the vue.js data model. And can be accessed over `this.$data._chart`
Updated unit tests

* 📝 Update docs with private data

*  Add codeclimate ignore

* ⬆️ Update codeclimate

* ⬆️ Update codeclimate

* ⬆️ Update codeclimate

Add build and config folders to ignore
2017-10-14 16:27:07 +02:00
bertolds
676a60a363 fix linting errors 2017-08-07 09:49:46 -04:00
bertolds
b7f2bf7db2 Merge branch 'patch-1' of https://github.com/dsbert/vue-chartjs into patch-1 2017-08-07 09:46:03 -04:00
Dan
1e392091ea Add support for xLabels and yLabels 2017-08-07 09:41:33 -04:00
Dan
a5b58c3b98 Add support for xLabels and yLabels 2017-08-04 15:06:22 -04:00
Jakub Juszczak
7a048a07df 🐛 Fix #122 reactive mixin
Reactive mixin broke if the initial data was set to null.
2017-07-02 16:02:10 +02:00
Spencer Dellis
d49b06f92a Fixing eslint issues. 2017-05-19 11:11:33 -04:00
Spencer Dellis
b762d400d2 Removing unnecessary line 2017-05-19 03:13:43 -04:00
Spencer Dellis
ceb5988e1c Resolve reactive props animation issue.
A small consequence of replacing the entire dataset in the mixins files is that it causes certain charts to completely re-render even if only the 'data' attribute of a dataset is changing. In my case, I set up a reactive doughnut chart with two data points but whenever the data values change, instead of shifting the fill coloring, it completely re-renders the entire chart.

You can see the issue in this fiddle (note the constant re-rendering):
https://jsfiddle.net/sg0c82ev/11/

To solve the issue, I instead run a diff between the new and old dataset keys, remove keys that aren't present in the new data,  and update the rest of the attributes individually. After making these changes my doughnut chart is animating as expected (even when adding and removing new dataset attributes).

A fiddle with my changes:
https://jsfiddle.net/sg0c82ev/12/

Perhaps this is too specific of a scenario to warrant a complexity increase like this (and better suited for a custom watcher) but I figured it would be better to dump it here and make it available for review. Let me know what you think.
2017-05-19 02:40:29 -04:00
Jakub Juszczak
874b674803 🐛 Fix reactiveMixins issue #42 2017-02-22 15:39:42 +01:00
Jakub Juszczak
6a82e42c6e 🐛 Fix eslint errors 2017-02-14 17:37:54 +01:00
Jakub Juszczak
aa76f518cb 🔨 Change reactiveMixins
Destroy chart instance on render()
Add additional check for dataset length
Add comments
Refactor reactiveData to match reactiveProp style
2017-02-14 17:31:18 +01:00
Jakub Juszczak
e716482154 Add reactiveProperty mixin 2016-10-02 18:10:44 +02:00