Sign in to follow this  
onkar

column chart shows negative value as positive

Recommended Posts

Hi,

I am using fusion chart v3.2.2.2

 

here is chart's rendered code.

 

<!-- Using ASP.NET FusionCharts v3.2.2.1 Wrapper and JavaScript rendering --><!-- START Script Block for Chart chrtPreviousLiquidity -->
<div id='chrtPreviousLiquidityDiv' >
Chart.
</div>
<script type="text/javascript">
if (FusionCharts && FusionCharts("chrtPreviousLiquidity") ) FusionCharts("chrtPreviousLiquidity").dispose();
var chart_chrtPreviousLiquidity = new FusionCharts({"dataFormat" : "jsonurl", "scaleMode" : "noScale", "renderAt" : "chrtPreviousLiquidityDiv", "id" : "chrtPreviousLiquidity", "debugMode" : "0", "lang" : "EN", "swfUrl" : "/FusionCharts/MSColumn2D.swf", "wMode" : "opaque", "width" : "350", "height" : "300", "registerWithJS" : "1","dataSource" : "/FusionCharts/Images/json1.json"}).render();</script>
<!-- END Script Block for Chart chrtPreviousLiquidity -->

 

Here is my json file code.

 

{
  "chart": {
    "caption": "Country Comparison",
    "showlabels": "1",
    "showvalues": "1",
    "decimals": "0",
    "numberprefix": "$",
    "placevaluesinside": "1",
    "rotatevalues": "1"
  },
  "categories": [
    {
      "category": [
        {
          "label": "Austria"
        },
        {
          "label": "Brazil"
        },
        {
          "label": "France"
        },
        {
          "label": "Italy"
        },
        {
          "label": "USA"
        }
      ]
    }
  ],
  "dataset": [
    {
      "seriesname": "1996",
      "color": "AFD8F8",
      "data": [
        {
          "value": "25601.34"
        },
        {
          "value": "20148.82"
        },
        {
          "value": "17372.76"
        },
        {
          "value": "35407.15"
        },
        {
          "value": "38105.68"
        }
      ]
    },
    {
      "seriesname": "1997",
      "color": "F6BD0F",
      "data": [
        {
          "value": "57401.85"
        },
        {
          "value": "41941.19"
        },
        {
          "value": "45263.37"
        },
        {
          "value": "117320.16"
        },
        {
          "value": "-2058.79"
        }
      ]
    },
    {
      "seriesname": "1998",
      "color": "8BBA00",
      "data": [
        {
          "value": "-2058.79"
        },
        {
          "value": "44835.76"
        },
        {
          "value": "18722.18"
        },
        {
          "value": "77557.31"
        },
        {
          "value": "92633.68"
        }
      ]
    }
  ]
}

 

chart shows value -2058.79 as positive instead of negative .

can you help me ?

I have attached screen shot of rendered chart.

post-62940-0-65566300-1412137955_thumb.png

Share this post


Link to post
Share on other sites

Hi,

 

As per your code snippet, I tried with your JSON data and it worked fine from our end.

 

I have attached the screenshot of the chart rendered in Firefox.

 

 

 

 

post-62849-0-08446800-1412662695_thumb.jpg

Share this post


Link to post
Share on other sites

Hi,

I am having the same issue (negative values are being plotted as positive).

 

Here is the response the browswer received:

<graph bgcolor='FFFFFF' canvasbgcolor='FFFFFF' showLegend='0' rotateNames='0' caption='DIGITAL MONTHLY TREND' subcaption='Total: $-165' decimalPrecision='1' animation='1' basefont='Verdana' basefontcolor='000000' outcnvbasefontcolor='000000' shownames='1' showvalues='0' labelStep='1' labelDisplay='Rotate' divlinecolor='333333' divlinethickness='1' showDivLineValues='1' hovercapbgColor='DEDEBE' hovercapborderColor='889E6D' pieFillAlpha='40' >
<set label='JUL 2015' value='2874.23' /><set label='AUG 2015' value='-3039.39' />
</graph>

 

Attachedis the chart.  July is plotted correctly, but August is not (it is being plotted as a postive 3K instead of a negative 3K).

 

I believe some users are seing negatives, but most are seeing positives.  Could this be a browser issue? Please let me know.

 

Thanks,

Rob

 

post-10187-0-53732500-1441207043_thumb.png

Share this post


Link to post
Share on other sites

Hi Again,

I think we figured out the issue.  Our application shows different types of charts, one at a time (ie pie chart, line charts, bar charts, etc).  When our application shows a pie chart that cotains a negative value, I believe it is treated as a positive value on the pie chart.  If you then change the chart to another type (in our case a line chart), the line chart then "breaks" and shows any negative values as positive.   This is a strange bug!  Vishalika, can you try to simulat this on your end and possible give us a solution/fix for this issue?

Thanks!,

Rob

Share this post


Link to post
Share on other sites

Hi,

 

We have tried to create such sample in ASP.NET  with FusionChart v3.8 that the different single series chart type(pie,column,line) having same piece of data is rendered with the help of Drop down menu.

 

But the issue is not replicated. Sharing screenshots of the same.

 

Share any scaled down sample for the issue to replicate, if possible.

post-62849-0-22524400-1441349921_thumb.png

post-62849-0-00738400-1441349924_thumb.png

post-62849-0-19195300-1441349927_thumb.png

Share this post


Link to post
Share on other sites

Hi,

The issue only appears when the first chart that is displayed is the pie chart (with one of the values being negative).  Then if you switch the chart to a line chart, the negative value appears as posituve.  The order of the test is important.  We are using "FusionCharts XT (v3.3.1 - Service Release 2) (28th May, 2013)".

Share this post


Link to post
Share on other sites

Hi,

 

This issue has been checked with the latest version of FusionCharts v3.8 which is totally JavaScript and we would suggest you to upgrade since we have stopped supporting the flash component of charts.

 

Also,using the latest ASP.NET wrapper which can be download from here: http://www.fusioncharts.com/asp-net-charts/

 

After following the use case you have mentioned, we  are unable to replicate the issue at our end. Please upgrade with the latest and check if it fulfils your requirement.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this