Closed GadepalliAditya1998 closed 3 years ago
I have been using msspline chart for showing multi-series data. If I show a single series the data is being represented correctly but when there is more than 1 series, the graphs show abnormal data.
FusionCharts.ready(function() { var visitChart = new FusionCharts({ type: 'msspline', renderAt: 'chart-container', width: '700', height: '400', dataFormat: 'json', dataSource: { "chart": { "theme": "fusion", "caption": "Number of visitors last week", "subCaption": "Bakersfield Central vs Los Angeles Topanga", "xAxisName": "Day", "yAxisName": "No. of Visitor", "showXAxisLine": "1", "xAxisLineColor": "#999999", 'decimals':'0' , 'adjustDiv':'0' }, categories: [ { category: [ { label: "Jan 1" }, { label: "Jan 2" }, { label: "Jan 3" }, { label: "Jan 4" }, { label: "Jan 5" }, { label: "Jan 6" }, { label: "Jan 7" } ] } ], dataset: [ { seriesname: "Received", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" } ] }, { seriesname: "Resolved", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "1" }, { value: "1" } ] } ] } }).render(); }); This is the data which I am trying to input
FusionCharts.ready(function() { var visitChart = new FusionCharts({ type: 'msspline', renderAt: 'chart-container', width: '700', height: '400', dataFormat: 'json', dataSource: { "chart": { "theme": "fusion", "caption": "Number of visitors last week", "subCaption": "Bakersfield Central vs Los Angeles Topanga", "xAxisName": "Day", "yAxisName": "No. of Visitor", "showXAxisLine": "1", "xAxisLineColor": "#999999", 'decimals':'0' , 'adjustDiv':'0' }, categories: [ { category: [ { label: "Jan 1" }, { label: "Jan 2" }, { label: "Jan 3" }, { label: "Jan 4" }, { label: "Jan 5" }, { label: "Jan 6" }, { label: "Jan 7" } ] } ], dataset: [ { seriesname: "Received", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" } ] }, { seriesname: "Resolved", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "1" }, { value: "1" } ] } ] } }).render(); });
and the result is: But when I select only 1 series by selecting on the legend filter:
Happens with data when values are near 0.
Can anyone suggest me a fix for this.
JSON Data: { type: 'msspline', renderAt: 'chart-container', width: '700', height: '400', dataFormat: 'json', dataSource: { "chart": { "theme": "fusion", "caption": "Number of visitors last week", "subCaption": "Bakersfield Central vs Los Angeles Topanga", "xAxisName": "Day", "yAxisName": "No. of Visitor", "showXAxisLine": "1", "xAxisLineColor": "#999999", 'decimals': '0', 'adjustDiv': '0' }, categories: [ { category: [ { label: "Jan 1" }, { label: "Jan 2" }, { label: "Jan 3" }, { label: "Jan 4" }, { label: "Jan 5" }, { label: "Jan 6" }, { label: "Jan 7" } ] } ], dataset: [ { seriesname: "Received", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" } ] }, { seriesname: "Resolved", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "1" }, { value: "1" } ] } ] } }
{ type: 'msspline', renderAt: 'chart-container', width: '700', height: '400', dataFormat: 'json', dataSource: { "chart": { "theme": "fusion", "caption": "Number of visitors last week", "subCaption": "Bakersfield Central vs Los Angeles Topanga", "xAxisName": "Day", "yAxisName": "No. of Visitor", "showXAxisLine": "1", "xAxisLineColor": "#999999", 'decimals': '0', 'adjustDiv': '0' }, categories: [ { category: [ { label: "Jan 1" }, { label: "Jan 2" }, { label: "Jan 3" }, { label: "Jan 4" }, { label: "Jan 5" }, { label: "Jan 6" }, { label: "Jan 7" } ] } ], dataset: [ { seriesname: "Received", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" } ] }, { seriesname: "Resolved", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "1" }, { value: "1" } ] } ] } }
@GadepalliAditya1998 Please set minimizeTendency as 1 at the chart object-level, demo : https://jsfiddle.net/a368nq7b/
@AyanBhadury , Works like charm thank you so much
I have been using msspline chart for showing multi-series data. If I show a single series the data is being represented correctly but when there is more than 1 series, the graphs show abnormal data.
FusionCharts.ready(function() { var visitChart = new FusionCharts({ type: 'msspline', renderAt: 'chart-container', width: '700', height: '400', dataFormat: 'json', dataSource: { "chart": { "theme": "fusion", "caption": "Number of visitors last week", "subCaption": "Bakersfield Central vs Los Angeles Topanga", "xAxisName": "Day", "yAxisName": "No. of Visitor", "showXAxisLine": "1", "xAxisLineColor": "#999999", 'decimals':'0' , 'adjustDiv':'0' }, categories: [ { category: [ { label: "Jan 1" }, { label: "Jan 2" }, { label: "Jan 3" }, { label: "Jan 4" }, { label: "Jan 5" }, { label: "Jan 6" }, { label: "Jan 7" } ] } ], dataset: [ { seriesname: "Received", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" } ] }, { seriesname: "Resolved", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "1" }, { value: "1" } ] } ] } }).render(); });
This is the data which I am trying to inputand the result is: But when I select only 1 series by selecting on the legend filter:
Happens with data when values are near 0.
Can anyone suggest me a fix for this.
JSON Data:
{ type: 'msspline', renderAt: 'chart-container', width: '700', height: '400', dataFormat: 'json', dataSource: { "chart": { "theme": "fusion", "caption": "Number of visitors last week", "subCaption": "Bakersfield Central vs Los Angeles Topanga", "xAxisName": "Day", "yAxisName": "No. of Visitor", "showXAxisLine": "1", "xAxisLineColor": "#999999", 'decimals': '0', 'adjustDiv': '0' }, categories: [ { category: [ { label: "Jan 1" }, { label: "Jan 2" }, { label: "Jan 3" }, { label: "Jan 4" }, { label: "Jan 5" }, { label: "Jan 6" }, { label: "Jan 7" } ] } ], dataset: [ { seriesname: "Received", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" } ] }, { seriesname: "Resolved", data: [ { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "0" }, { value: "1" }, { value: "1" } ] } ] } }