Skip to content

Commit 44acc38

Browse files
authored
Merge pull request #49 from fusioncharts/core-fix/multi-series-fusiontime-fix
Added fix for multiseries max stack size exceeding issue for fusiontime
2 parents ff70557 + 14055b3 commit 44acc38

File tree

8 files changed

+152
-160
lines changed

8 files changed

+152
-160
lines changed

example/index.html

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@
1818

1919
<body>
2020
<div id="chart1">
21-
<fusioncharts
22-
:width="width"
23-
:height="height"
24-
:type="pieType"
25-
:dataFormat="dataFormat"
26-
:dataSource="chartDs"
27-
>
28-
FusionCharts will render here...
29-
</fusioncharts>
3021
<fusioncharts
3122
:width="width"
3223
:height="height"
@@ -36,10 +27,7 @@
3627
>
3728
FusionCharts will render here...
3829
</fusioncharts>
39-
<button @click="changeFirstChartAttr">Change 1st Chart Attributes</button>
40-
<button @click="changeSecondChartAttr">
41-
Change 2nd Chart Attributes
42-
</button>
30+
<button @click="changeChartAttr">Update Chart</button>
4331
</div>
4432
<script type="text/javascript" src="bundle.js"></script>
4533
</body>

example/index.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import Charts from 'fusioncharts/fusioncharts.charts';
88
import TimeSeries from 'fusioncharts/fusioncharts.timeseries';
99

1010
const jsonify = res => res.json();
11-
var dataFetch = fetch(
11+
const dataFetch = fetch(
1212
'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/data/plotting-multiple-series-on-time-axis-data.json'
1313
).then(jsonify);
14-
var schemaFetch = fetch(
14+
const schemaFetch = fetch(
1515
'https://s3.eu-central-1.amazonaws.com/fusion.store/ft/schema/plotting-multiple-series-on-time-axis-schema.json'
1616
).then(jsonify);
1717

@@ -27,6 +27,8 @@ var chart = new Vue({
2727
el: '#chart1',
2828
components: { fusioncharts: vFC },
2929
data: {
30+
component: true,
31+
show: false,
3032
counter: 0,
3133
chartType: 'Pie2D',
3234
pieDataSource: {
@@ -65,7 +67,6 @@ var chart = new Vue({
6567
}
6668
]
6769
},
68-
pieType: 'Pie2D',
6970
chartDs: {
7071
chart: {
7172
caption: 'Vue FusionCharts Sample',
@@ -125,20 +126,14 @@ var chart = new Vue({
125126
var max = 5,
126127
min = 2;
127128
return Math.round((max - min) * Math.random() + min);
129+
},
130+
changeChartAttr: function() {
131+
let dataSource = Object.assign({}, this.dataSource);
132+
dataSource.caption.text = 'Changed to something else';
133+
this.dataSource = dataSource;
128134
}
129135
},
130136
mounted: function() {
131-
// Promise.all([dataFetch, schemaFetch]).then(res => {
132-
// const data = res[0];
133-
// const schema = res[1];
134-
// const fusionTable = new FusionCharts.DataStore().createDataTable(
135-
// data,
136-
// schema
137-
// );
138-
// this.dataSource.data = fusionTable;
139-
// });
140-
},
141-
beforeMount: function() {
142137
Promise.all([dataFetch, schemaFetch]).then(res => {
143138
const data = res[0];
144139
const schema = res[1];

example/script-sample.html

Lines changed: 70 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,81 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<title>My first vue app</title>
5-
<script type="text/javascript" src="https://unpkg.com/[email protected]"></script>
6-
<script type="text/javascript" src="../node_modules/fusioncharts/fusioncharts.js"></script>
7-
<script type="text/javascript" src="../node_modules/fusioncharts/fusioncharts.charts.js"></script>
8-
<script type="text/javascript" src="../node_modules/fusioncharts/themes/fusioncharts.theme.fint.js"></script>
9-
<script type="text/javascript" src="../dist/vue-fusioncharts.min.js"></script>
3+
<head>
4+
<title>My first vue app</title>
5+
<script type="text/javascript" src="https://unpkg.com/[email protected]"></script>
6+
<script
7+
type="text/javascript"
8+
src="../node_modules/fusioncharts/fusioncharts.js"
9+
></script>
10+
<script
11+
type="text/javascript"
12+
src="../node_modules/fusioncharts/fusioncharts.charts.js"
13+
></script>
14+
<script
15+
type="text/javascript"
16+
src="../node_modules/fusioncharts/themes/fusioncharts.theme.fint.js"
17+
></script>
18+
<script
19+
type="text/javascript"
20+
src="../dist/vue-fusioncharts.min.js"
21+
></script>
1022
<style type="text/css">
11-
.message-box {
12-
text-align: center;
13-
margin-top: 0px;
14-
background-color: #F5FBFF;
15-
width: 500px;
16-
color: #006BB8;
17-
padding: 5px 10px;
18-
box-sizing: border-box;
19-
border: 1px solid #B8E1FF;
20-
}
23+
.message-box {
24+
text-align: center;
25+
margin-top: 0px;
26+
background-color: #f5fbff;
27+
width: 500px;
28+
color: #006bb8;
29+
padding: 5px 10px;
30+
box-sizing: border-box;
31+
border: 1px solid #b8e1ff;
32+
}
2133
</style>
22-
</head>
23-
<body>
24-
25-
<!-- demo root element -->
34+
</head>
35+
<body>
36+
<!-- demo root element -->
2637
<div id="chart1">
27-
<fusioncharts
28-
:type="type"
29-
:dataformat="dataFormat"
30-
:datasource="dataSource"
31-
:width="width"
32-
:height="height"
33-
:events="events"
34-
35-
ref="fusioncharts"
36-
>
37-
</fusioncharts>
38-
<p class="message-box">The value that you have selected is: {{displayValue}} </p>
38+
<fusioncharts
39+
:type="type"
40+
:dataformat="dataFormat"
41+
:datasource="dataSource"
42+
:width="width"
43+
:height="height"
44+
:events="events"
45+
ref="fusioncharts"
46+
>
47+
</fusioncharts>
48+
<p class="message-box">
49+
The value that you have selected is: {{ displayValue }}
50+
</p>
3951
</div>
4052

4153
<script type="text/javascript">
42-
Vue.use(VueFusionCharts);
54+
Vue.use(VueFusionCharts);
4355

44-
// bootstrap the demo
45-
var chart = new Vue({
46-
el: '#chart1',
47-
data: {
48-
type: 'Column2D',
49-
width: '500',
50-
height: '300',
51-
dataFormat: 'json',
52-
dataSource: {
53-
chart: {
54-
caption: 'Vue FusionCharts Sample',
55-
theme: 'fint'
56-
},
57-
data: [{value: 1.9}, {value: 2.3}, {value: 2.1}]
58-
},
59-
displayValue: 'nothing',
60-
events: {
61-
dataplotRollover: function (ev, props) {
62-
chart.displayValue = props.displayValue
63-
}
64-
}
56+
// bootstrap the demo
57+
var chart = new Vue({
58+
el: '#chart1',
59+
data: {
60+
type: 'Column2D',
61+
width: '500',
62+
height: '300',
63+
dataFormat: 'json',
64+
dataSource: {
65+
chart: {
66+
caption: 'Vue FusionCharts Sample',
67+
theme: 'fint'
68+
},
69+
data: [{ value: 1.9 }, { value: 2.3 }, { value: 2.1 }]
70+
},
71+
displayValue: 'nothing',
72+
events: {
73+
dataplotRollover: function(ev, props) {
74+
chart.displayValue = props.displayValue;
6575
}
66-
});
76+
}
77+
}
78+
});
6779
</script>
68-
69-
</body>
70-
</html>
80+
</body>
81+
</html>

example/webpack.config.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
var path = require('path');
22

33
module.exports = {
4-
entry: './example/index.js',
5-
output: {
6-
filename: 'bundle.js',
7-
library: "FC",
8-
path: path.resolve(__dirname, './')
9-
},
10-
devtool: 'source-map',
11-
resolve: {
12-
alias: {
13-
vue: 'vue/dist/vue.js'
14-
}
15-
},
16-
devServer: {
17-
'contentBase': './example',
18-
// open: true
4+
entry: './example/index.js',
5+
output: {
6+
filename: 'bundle.js',
7+
library: 'FC',
8+
path: path.resolve(__dirname, './')
9+
},
10+
devtool: 'source-map',
11+
resolve: {
12+
alias: {
13+
vue: 'vue/dist/vue.js'
1914
}
15+
},
16+
devServer: {
17+
contentBase: './example'
18+
// open: true
19+
}
2020
};

0 commit comments

Comments
 (0)