Sign in to follow this  
Pri

Controlling The Location Of Values

Recommended Posts

Hi Friends,

 

PFA a chart. In this chart except for the first bar all the values are displayed inside the bars. Can I control the position of these values so that all the values are displayed either inside or outside the bars. I tried using placeValuesInside='1' parameter, but nothing happened. Also is there a way that I can display all the values at the base of the bars?

 

query.bmp

 

Thanks,

Pri

Edited by Pri

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

This depends on the data you are providing to the chart.

 

When you apply placeValuesInside attribute as "1", chart automatically displays the values inside the plot depending on the value scale.

 

If you are comparing small scale values with a larger one, then the chart plots small area/portion(column) for the particular small scale value, thus placing value inside such plot will not be display the value properly.

 

Hence chart adjusts them accordingly.

 

Please find attached screen-shots which will give you a clear idea.

post-24802-0-81778000-1346066442_thumb.png

post-24802-0-90288600-1346066454_thumb.png

Share this post


Link to post
Share on other sites

Hi,

 

This depends on the data you are providing to the chart.

 

When you apply placeValuesInside attribute as "1", chart automatically displays the values inside the plot depending on the value scale.

 

If you are comparing small scale values with a larger one, then the chart plots small area/portion(column) for the particular small scale value, thus placing value inside such plot will not be display the value properly.

 

Hence chart adjusts them accordingly.

 

Please find attached screen-shots which will give you a clear idea.

 

 

Thanks a lot Sumedh. :).

 

But is there any way that we can display the data at the base of the bars, ie. near the X-Axis?

Share this post


Link to post
Share on other sites

I am also experiencing this issue with StackedBar3D Charts. The chart attribute "PlaceValuesInside" does nothing :(. We are attempting to display values but sometimes the slice is so small the label value overlaps with the next.

Also with the StackedBar3D "Javascript" renderer there is an issue when attempting to pass the attribute "Show100Percent = 1". I receive Jquery errors in firebug. The Flash renderer works fine.

 

Thank you in advance for looking into this issue. If you require additional information please ping me.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

Can you paste your chart XML here? And mention the FusionCharts version details.

 

Also send us the screen-shot of your issue.

Share this post


Link to post
Share on other sites

Hi,

 

Can you paste your chart XML here? And mention the FusionCharts version details.

 

Also send us the screen-shot of your issue.

 

I am currently using Javascript to render the chart and not XML ... but here is the code and a screenshot:

 

$(obj).insertFusionCharts({

swfUrl: APP_PATH+"js/libs/fusion/StackedBar3D.swf",

width: "100%",

height: "100%",

id: "dwp",

dataFormat: "json",

dataSource: {

"chart": {

"palette": "1",

"paletteColors" : "3399FF,FFCC00,33CC00,500BF4,6666CC",

"showlabels": "1",

"numberprefix": "",

"showsum": "0",

"decimals": "0",

"useroundedges": "1",

"legendborderalpha": "0",

"numVDivLines":"10",

"vDivLineThickness":"1",

"vDivLineColor": "fff",

"plotgradientcolor":"",

"exportenabled": 1,

"outcnvbasefont":"Arial",

"outcnvbasefontsize":"12",

"outcnvbasefontcolor":"333333",

"showvalues": "1",

"placevaluesinside": "0",

"showshadow":1,

"stack100Percent ": (Show100)?1:0

},

"categories": [{"category": [DWP_CATEGORY]}],

"dataset": DWP_DATA,

"styles":{

"definition": CHART_STYLE_DEFINITION,

"application": [

{ "toobject":"XAxisName", "styles":"myAxisTitlesFont" },

{ "toobject":"YAxisName", "styles":"myAxisTitlesFont" },

{ "toobject": "Caption", "styles": "myCaptionAnim" },

{ "toobject": "DataValues", "styles": "myValuesFont_NoBkgd" } ]

}

}

});

 

 

Thank you very much for looking into this :D

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

From the JSON data, I can understand that it is not in the proper format.

 

You would need to use following JSON format for Stacked Bar 2D chart:

 

Ref. Code:

 

{
 "chart": {
   "caption": "Company Revenue"
    .
	.
 },
 "categories": [
   {
     "category": [
       {
         "label": "Jan"
       },
       .
	.
	.
     ]
   }
 ],
 "dataset": [
   {
     "seriesname": "Product A",
     "data": [
       {
         "value": "27400"
       },
       .
	.
	.
     ]
   },
   {
     "seriesname": "Product B",
     "data": [
       {
         "value": "10000"
       },
       .
	.
	.
     ]
   }
 ]

}

 

 

Also, refer this URL: http://docs.fusionch...SS/StBar2D.html

 

If you are still replicating the issue, then send us the JSON data.

Share this post


Link to post
Share on other sites

Thank you again very much for your time.

I've attached the dataset. Again my issue is that I attempting to display the labels on the outside of the bars and not the inside.

 

"dataset": [{

"seriesname": "FORUM",

"data": [{

"value": 356724,

"tooltext": "Documents Collected: 356724"

},

{

"value": 78893,

"tooltext": "Documents Collected: 78893"

},

{

"value": 155361,

"tooltext": "Documents Collected: 155361"

}]

},

{

"seriesname": "BLOGS",

"data": [{

"value": 5647,

"tooltext": "Documents Collected: 5647"

},

{

"value": 402,

"tooltext": "Documents Collected: 402"

},

{

"value": 12182,

"tooltext": "Documents Collected: 12182"

}]

},

{

"seriesname": "SOCIALMEDIA",

"data": [{

"value": 3505,

"tooltext": "Documents Collected: 3505"

},

{

"value": 3661,

"tooltext": "Documents Collected: 3661"

},

{

"value": 3008,

"tooltext": "Documents Collected: 3008"

}]

},

{

"seriesname": "VIDEOS",

"data": [{

"value": 16000,

"tooltext": "Documents Collected: 16000"

},

{

"value": 1900,

"tooltext": "Documents Collected: 1900"

},

{

"value": 8500,

"tooltext": "Documents Collected: 8500"

}]

}]

 

<img src="http://www.anony.ws/i/2012/09/06/mJGsR.png" border="0" />

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

You can not display data values outside the plot for individual data sets.

 

As a work around, you can show sum of each stacked bar along its side using showSum attribute. Set this attribute as "1".

 

Ref. Code:

 

{

"chart":{

"showSum" : "1"

},

 

Also, you would need set showValues attribute as "0" for each dataset element.

 

Ref. Code:

"dataset": [

 

{

"showvalues": "0",

"data": [ ...

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