Commit Graph

333 Commits

Author SHA1 Message Date
Spencer Dellis
5cc8f0a878 Resolve reactivity mixin animation issue.
A small consequence of replacing the entire dataset in the [reactive mixins files](https://github.com/apertureless/vue-chartjs/blob/develop/src/mixins/reactiveData.js) is that it causes 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 (the problem remains even when changing chart type):
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 (and better suited for a custom handler) 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 03:16:12 -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
d60c63edbb 💎 Release new version 2.6.3
Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
v2.6.3
2017-05-14 12:56:24 +02:00
Jakub Juszczak
da6789d4ba ⬆️ Update dependency vue to 2.3.3 2017-05-14 12:54:44 +02:00
Jakub
9a780d9922 Fix npm downloads badge 2017-05-09 22:33:10 +02:00
Jakub
be6f3956cf Merge pull request #105 from guilherfp/patch-1
Update README.md
2017-05-07 21:26:32 +02:00
Guilherme Freitas Pacheco
aeee51dfc8 Update README.md 2017-05-07 15:33:43 -03:00
Jakub Juszczak
92c05b838c 🐛 📝 Update docs 2017-05-05 19:38:34 +02:00
Jakub Juszczak
4be1e8f9da Add japanese docs to config 2017-05-05 19:35:55 +02:00
Jakub
3e641ce620 Merge pull request #102 from euledge/japanese_translate
translated README.md into Japanese
2017-05-05 19:32:41 +02:00
Hitoshi Kuroyanagi
fae16ff894 translated README.md into Japanese 2017-05-05 21:24:40 +09:00
Jakub Juszczak
c325e573a2 📝 Update readme 2017-05-02 08:39:25 +02:00
Jakub
78c212f116 Merge pull request #100 from extend1994/add-badge
add CDNJS version badge in README.md
2017-05-01 11:33:37 +02:00
LboAnn
3e1b5afe7e add CDNJS version badge in README.md
This badge will show the version on CDNJS!
2017-05-01 11:14:30 +02:00
Jakub Juszczak
47c1543e6c 📝 Update CHANGELOG 2017-04-29 15:30:25 +02:00
Jakub Juszczak
25d3766687 💎 Release new version 2.6.2
Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
v2.6.2
2017-04-29 15:27:18 +02:00
Jakub
1c1ad3c146 Merge pull request #96 from apertureless/feature/update_dependencies
⬆️ Update dev dependencies
2017-04-29 15:22:48 +02:00
Jakub Juszczak
2791e8ed61 ⬆️ Update dev dependencies 2017-04-29 15:17:45 +02:00
Jakub Juszczak
06cb7e79f6 📝 Update CHANGELOG
Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
2017-04-21 16:21:33 +02:00
Jakub Juszczak
6211d034e6 💎 Release new version 2.6.1
Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
v2.6.1
2017-04-21 16:17:37 +02:00
Jakub Juszczak
f32d989334 🔥 Remove deprecated type argument in barchart
The BarChart got splitted into HorizontalBar and Bar, so the type is not nessasary anymore.
2017-04-21 16:16:31 +02:00
Jakub Juszczak
ba11190e39 📝 Update CHANGELOG 2017-04-09 13:02:53 +02:00
Jakub Juszczak
7234292a49 💎 Release new version 2.6.0
Signed-off-by: Jakub Juszczak <netghost03@gmail.com>
v2.6.0
2017-04-09 12:59:49 +02:00
Jakub Juszczak
c91fee9a1a 🐛 Fix tags for docsearch 2017-04-06 11:16:47 +02:00
Jakub Juszczak
7e7e5d0028 Add docsearch plugin from agolia 2017-04-06 11:06:32 +02:00
Jakub Juszczak
2ab4cacf12 🐛 Fix typo 2017-04-05 16:30:11 +02:00
Jakub Juszczak
227f698647 📝 Update DOCS 2017-04-05 16:28:14 +02:00
Jakub Juszczak
8d893eb8b2 📝 Update README 2017-04-05 16:28:08 +02:00
Jakub Juszczak
1b527e9c67 💎 Release new version 2.6.0-rc1 v2.6.0-rc1 2017-04-05 16:05:20 +02:00
Jakub Juszczak
3103d5acd9 Add browser full build 2017-04-05 16:04:24 +02:00
Jakub Juszczak
2c8d1169e8 Add version to object 2017-04-05 16:04:07 +02:00
Jakub
6ac651e55a Merge pull request #84 from gcoguiec/develop
Update release build to not include externals.
2017-04-05 14:07:40 +02:00
Guillaume Coguiec
129a52e4d7 Restore lodash as a dependency. 2017-04-03 15:19:20 -04:00
Guillaume Coguiec
11015b4080 Remove lodash from externals. 2017-04-03 15:18:23 -04:00
Jakub Juszczak
56edbf2bd4 Add language select and german translation 2017-04-01 20:07:56 +02:00
Jakub Juszczak
77c63d4dd4 ⬆️ Update docute docs 2017-04-01 19:59:25 +02:00
Jakub Juszczak
14cb2f9e62 📝 Update docs 2017-03-30 16:34:41 +02:00
Guillaume Coguiec
9e6b407a1e Update release build to not include externals. 2017-03-29 14:57:26 -04:00
Jakub Juszczak
94dcc0fd0e 💎 Release new version 2.5.6 v2.5.6 2017-03-29 17:14:13 +02:00
Jakub Juszczak
cb51f2a187 ⬆️ Update dependencies vue@2.2.6 2017-03-29 17:13:29 +02:00
Jakub Juszczak
770ff26be4 📝 Update CHANGELOG 2017-03-24 17:06:28 +01:00
Jakub Juszczak
13e783c29d 💎 Release new version 2.5.5 v2.5.5 2017-03-24 17:03:48 +01:00
Jakub Juszczak
b0b8d88794 🔥 Remove greenkeeper badge 2017-03-24 17:02:50 +01:00
Jakub Juszczak
dc8e198f10 ⬆️ Update dependencies 2017-03-24 17:02:44 +01:00
Jakub Juszczak
348de825bf Add new entry for development 2017-03-22 19:02:49 +01:00
Jakub
87fb35749e Merge pull request #73 from mika76/patch-1
Removed -s flag from yarn command in docs
2017-03-22 15:50:09 +01:00
Mladen Mihajlović
0f697a2bc5 Removed -s flag from yarn command
There is no -s flag (https://github.com/yarnpkg/yarn/issues/2532)
2017-03-22 07:03:48 +02:00
Jakub Juszczak
8c670775f5 Merge branch 'develop'
* develop:
  💎 Release new version 2.5.4
  🔥 Remove browser field from npm
v2.5.4
2017-03-19 17:23:03 +01:00
Jakub Juszczak
d6ff509dc0 💎 Release new version 2.5.4 2017-03-19 17:21:45 +01:00