Skip to content

Commit 12b7f1a

Browse files
rohanoid5ashok1994
authored andcommitted
Core fix/multi series fix (#47)
* Added patch fix for multi series chart error * Cleaned up code * Removed test codes * Added check for FC library * Fixed datasource and dataSource conflict
1 parent 91d8f13 commit 12b7f1a

File tree

7 files changed

+48
-7
lines changed

7 files changed

+48
-7
lines changed

component/index.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

component/index.js.map

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

component/index.min.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-fusioncharts.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-fusioncharts.js.map

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-fusioncharts.min.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vue-fusioncharts-component.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export default (FC, ...options) => {
150150
// SPECIAL CASE: When DataSource has series attribute, vue internally goes into Infinite recursion
151151
// specifically on _traverse method. This code is written to tackle that issue. In future a much more
152152
// concrete solution is required.
153-
if (this.datasource.series) {
153+
if (this.datasource && this.datasource.series) {
154154
const _FC_ = _FC || window.FusionCharts;
155155
const data = JSON.parse(JSON.stringify(newVal._data));
156156
const schema = JSON.parse(JSON.stringify(newVal._schema));
@@ -180,10 +180,11 @@ export default (FC, ...options) => {
180180
'dataSource.data': {
181181
handler: function(newVal, prevVal) {
182182
if (newVal !== prevVal) {
183-
if (this.datasource.series) {
183+
if (this.dataSource && this.dataSource.series) {
184+
const _FC_ = _FC || window.FusionCharts;
184185
const data = JSON.parse(JSON.stringify(newVal._data));
185186
const schema = JSON.parse(JSON.stringify(newVal._schema));
186-
const dataTable = new _FC.DataStore().createDataTable(
187+
const dataTable = new _FC_.DataStore().createDataTable(
187188
data,
188189
schema
189190
);

0 commit comments

Comments
 (0)