Skip to content

Commit

Permalink
Added fix for multiseries max stack size exceeding issue for fusiontime
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanoid5 committed May 8, 2019
1 parent ff70557 commit 18ae92f
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 146 deletions.
34 changes: 16 additions & 18 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,25 @@
<body>
<div id="chart1">
<fusioncharts
:width="width"
:height="height"
:type="pieType"
:dataFormat="dataFormat"
:dataSource="chartDs"
>
FusionCharts will render here...
</fusioncharts>
<fusioncharts
:width="width"
:height="height"
:type="type"
:dataFormat="dataFormat"
:dataSource="dataSource"
>
FusionCharts will render here...
</fusioncharts>
:width="width"
:height="height"
:type="type"
:dataFormat="dataFormat"
:dataSource="dataSource"
>
FusionCharts will render here...
</fusioncharts>
</div>
<!-- <button type="button" @click="component = !component">
Swap component
</button>
<button v-show="component" type="button" @click="show = !show">
Toggle chart show
</button>
<button @click="changeFirstChartAttr">Change 1st Chart Attributes</button>
<button @click="changeSecondChartAttr">
Change 2nd Chart Attributes
</button>
</button> -->
</div>
<script type="text/javascript" src="bundle.js"></script>
</body>
Expand Down
25 changes: 20 additions & 5 deletions example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import Charts from 'fusioncharts/fusioncharts.charts';
import TimeSeries from 'fusioncharts/fusioncharts.timeseries';

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

Expand All @@ -27,6 +27,8 @@ var chart = new Vue({
el: '#chart1',
components: { fusioncharts: vFC },
data: {
component: true,
show: false,
counter: 0,
chartType: 'Pie2D',
pieDataSource: {
Expand Down Expand Up @@ -54,7 +56,7 @@ var chart = new Vue({
subcaption: {
text: 'Grocery & Footwear'
},
series: 'Type',
series: 'ABC',
yAxis: [
{
plot: 'Sales Value',
Expand All @@ -65,7 +67,6 @@ var chart = new Vue({
}
]
},
pieType: 'Pie2D',
chartDs: {
chart: {
caption: 'Vue FusionCharts Sample',
Expand Down Expand Up @@ -141,7 +142,21 @@ var chart = new Vue({
beforeMount: function() {
Promise.all([dataFetch, schemaFetch]).then(res => {
const data = res[0];
const schema = res[1];
const schema = [
{
name: 'Time',
type: 'date',
format: '%d-%b-%y'
},
{
name: 'ABC',
type: 'string'
},
{
name: 'Sales Value',
type: 'number'
}
];
const fusionTable = new FusionCharts.DataStore().createDataTable(
data,
schema
Expand Down
129 changes: 70 additions & 59 deletions example/script-sample.html
Original file line number Diff line number Diff line change
@@ -1,70 +1,81 @@
<!DOCTYPE html>
<html>
<head>
<title>My first vue app</title>
<script type="text/javascript" src="https://unpkg.com/[email protected]"></script>
<script type="text/javascript" src="../node_modules/fusioncharts/fusioncharts.js"></script>
<script type="text/javascript" src="../node_modules/fusioncharts/fusioncharts.charts.js"></script>
<script type="text/javascript" src="../node_modules/fusioncharts/themes/fusioncharts.theme.fint.js"></script>
<script type="text/javascript" src="../dist/vue-fusioncharts.min.js"></script>
<head>
<title>My first vue app</title>
<script type="text/javascript" src="https://unpkg.com/[email protected]"></script>
<script
type="text/javascript"
src="../node_modules/fusioncharts/fusioncharts.js"
></script>
<script
type="text/javascript"
src="../node_modules/fusioncharts/fusioncharts.charts.js"
></script>
<script
type="text/javascript"
src="../node_modules/fusioncharts/themes/fusioncharts.theme.fint.js"
></script>
<script
type="text/javascript"
src="../dist/vue-fusioncharts.min.js"
></script>
<style type="text/css">
.message-box {
text-align: center;
margin-top: 0px;
background-color: #F5FBFF;
width: 500px;
color: #006BB8;
padding: 5px 10px;
box-sizing: border-box;
border: 1px solid #B8E1FF;
}
.message-box {
text-align: center;
margin-top: 0px;
background-color: #f5fbff;
width: 500px;
color: #006bb8;
padding: 5px 10px;
box-sizing: border-box;
border: 1px solid #b8e1ff;
}
</style>
</head>
<body>

<!-- demo root element -->
</head>
<body>
<!-- demo root element -->
<div id="chart1">
<fusioncharts
:type="type"
:dataformat="dataFormat"
:datasource="dataSource"
:width="width"
:height="height"
:events="events"

ref="fusioncharts"
>
</fusioncharts>
<p class="message-box">The value that you have selected is: {{displayValue}} </p>
<fusioncharts
:type="type"
:dataformat="dataFormat"
:datasource="dataSource"
:width="width"
:height="height"
:events="events"
ref="fusioncharts"
>
</fusioncharts>
<p class="message-box">
The value that you have selected is: {{ displayValue }}
</p>
</div>

<script type="text/javascript">
Vue.use(VueFusionCharts);
Vue.use(VueFusionCharts);

// bootstrap the demo
var chart = new Vue({
el: '#chart1',
data: {
type: 'Column2D',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
chart: {
caption: 'Vue FusionCharts Sample',
theme: 'fint'
},
data: [{value: 1.9}, {value: 2.3}, {value: 2.1}]
},
displayValue: 'nothing',
events: {
dataplotRollover: function (ev, props) {
chart.displayValue = props.displayValue
}
}
// bootstrap the demo
var chart = new Vue({
el: '#chart1',
data: {
type: 'Column2D',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
chart: {
caption: 'Vue FusionCharts Sample',
theme: 'fint'
},
data: [{ value: 1.9 }, { value: 2.3 }, { value: 2.1 }]
},
displayValue: 'nothing',
events: {
dataplotRollover: function(ev, props) {
chart.displayValue = props.displayValue;
}
});
}
}
});
</script>

</body>
</html>
</body>
</html>
30 changes: 15 additions & 15 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
var path = require('path');

module.exports = {
entry: './example/index.js',
output: {
filename: 'bundle.js',
library: "FC",
path: path.resolve(__dirname, './')
},
devtool: 'source-map',
resolve: {
alias: {
vue: 'vue/dist/vue.js'
}
},
devServer: {
'contentBase': './example',
// open: true
entry: './example/index.js',
output: {
filename: 'bundle.js',
library: 'FC',
path: path.resolve(__dirname, './')
},
devtool: 'source-map',
resolve: {
alias: {
vue: 'vue/dist/vue.js'
}
},
devServer: {
contentBase: './example'
// open: true
}
};
Loading

0 comments on commit 18ae92f

Please sign in to comment.