FusionCharts Forum: X Axis Labels - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

X Axis Labels

#1 User is offline   marcfromm 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 07-February 12

Posted 07 February 2012 - 11:41 PM

I followed an online tutorial for fusion carts and php. Everything works my data for a postgresql database displays correctly. I am now trying to format the x axis labels to be vertical. I found that labelDisplay=ROTATE is used to do this. When I include this there is no change to my x axis labels. In the $strParam line "labelDisplay=ROTATE" seems to be ignored, whether it is there or not the chart is displayed but the x-axis labels remain horizontal. How can I make my x-axis labels vertical? Thanks.


$strParam="caption=Workstudy Students;subCaption=By spriden_origin;xAxisName=spriden_origin;yAxisName=Students;labelDisplay=ROTATE;decimalPrecision=0; formatNumberScale=0";
$FC->setChartParams($strParam);

// Connect to the Database
$conn = pg_connect("host=localhost port=#### user=######## dbname=###");

$strQuery = "SELECT spriden_origin, count(spriden_origin) as total FROM sw_items GROUP BY spriden_origin ORDER BY spriden_origin";
$result = pg_query($conn, $strQuery);
$numrows = pg_num_rows($result);
echo "Records:" . $numrows . "<br />";

while($row = pg_fetch_object($result)){
    $count = $row->total;
    $spriden_origin = $row->spriden_origin;
    echo $spriden_origin . " : " . $count . " | ";
    $FC->addChartData($count,"name=" . $spriden_origin);
    } 

$FC->renderChart();

0

Other Replies To This Topic

#2 User is offline   Sumedh 

  • Supreme Being
  • Group: Administrators
  • Posts: 668
  • Joined: 21-December 11
  • LocationBangalore

Posted 08 February 2012 - 10:43 AM

Greetings. :)

I am afraid, I could not replicate the same.

Please find attached screenshot for your reference with this reply.

Can you please, send us the relevant XML file of your issue?

It will be helpful for us, to look into it.

Attached thumbnail(s)

  • Attached Image: label_Display.JPG

Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/

Thanks,
Sumedh

Follow us @Twitter!
0

Other Replies To This Topic

#3 User is offline   marcfromm 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 07-February 12

Posted 08 February 2012 - 06:24 PM

View PostSumedh, on 08 February 2012 - 10:43 AM, said:

Greetings. :)

I am afraid, I could not replicate the same.

Please find attached screenshot for your reference with this reply.

Can you please, send us the relevant XML file of your issue?

It will be helpful for us, to look into it.

If by XML you mean the view source of the php page as seen in the browser.
<!-- START Script Block for Chart Column3D1 --> 
 
<div id="Column3D1Div">
 Chart.
</div>
<script type="text/javascript" > 
 var chart_Column3D1 = new FusionCharts("../FusionCharts/FCF_Column3D.swf", "Column3D1", "1200", "300", "0", "0", "","noScale","EN"); 
 //Provide entire XML data using dataXML method
 chart_Column3D1.setDataXML("<graph caption='Workstudy Students' subCaption='By spriden_origin' xAxisName='spriden_origin' yAxisName='Students' labelDisplay='ROTATE' decimalPrecision='0'  formatNumberScale='0'  ><set  value='1' name='ADMWEB'  color='AFD8F8'  /><set  value='17436' name='ADNT'  color='F6BD0F'  /><set  value='5' name='ALCONV'  color='8BBA00'  /><set  value='6' name='ALNT'  color='FF8E46'  /><set  value='37' name='APAIDEN'  color='008E8E'  /><set  value='3' name='FOAIDEN'  color='D64646'  /><set  value='35' name='FTMVEND'  color='8E468E'  /><set  value='41' name='PPAIDEN'  color='588526'  /><set  value='3' name='RCRTP00'  color='B3AA00'  /><set  value='10' name='RCRTP01'  color='008ED6'  /><set  value='13' name='RCRTP02'  color='9D080D'  /><set  value='22' name='RCRTP03'  color='A186BE'  /><set  value='40' name='RCRTP04'  color='CC6600'  /><set  value='48' name='RCRTP05'  color='FDC689'  /><set  value='57' name='RCRTP06'  color='ABA000'  /><set  value='55' name='RCRTP07'  color='F26D7D'  /><set  value='107' name='RCRTP08'  color='FFF200'  /><set  value='149' name='RCRTP09'  color='0054A6'  /><set  value='330' name='RCRTP10'  color='F7941C'  /><set  value='497' name='RCRTP11'  color='CC3300'  /><set  value='3682' name='RCRTP12'  color='006600'  /><set  value='19' name='SAAQUIK'  color='663300'  /><set  value='75' name='SORTAPE'  color='6DCFF6'  /><set  value='973' name='SPAIDEN'  color='AFD8F8'  /><set  value='75' name='SRAQUIK'  color='F6BD0F'  /><set  value='155' name='STUCONV'  color='8BBA00'  /><set  value='0' name=''  color='FF8E46'  /></graph>");
 chart_Column3D1.render("Column3D1Div");
</script>
 
<!-- END Script Block for Chart Column3D1 -->

The acutal php page code is as shown in the start of my post in the code block.

Thanks
0

Other Replies To This Topic

#4 User is offline   marcfromm 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 07-February 12

Posted 08 February 2012 - 08:06 PM

Attached is what the chart looks like.

Attached thumbnail(s)

  • Attached Image: Snap14.jpg

0

Other Replies To This Topic

#5 User is offline   marcfromm 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 07-February 12

Posted 08 February 2012 - 11:36 PM

The only other thing I can provide to find a sollution to not being abale to rotate the x-axis labels is can it be because I am using "FusionCharts_Gen.php" as an include and not "FusionCharts.php" ?

I hope there can be a solution, since as shown in my attacehd image above having 27 different items to graph creates a mess on the x-axis labels.

Thanks


0

Other Replies To This Topic

#6 User is offline   Bindhu 

  • Forum Guru
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 224
  • Joined: 24-November 11
  • LocationBangalore

Posted 09 February 2012 - 03:50 AM

Hi,

Thank you for the post.

Can you please let us know the version of FusionCharts that you are currently using ?

It seems like you are using FusionCharts Free version.

If yes, can you please try using 'rotateNames' attribute of the chart and set it to 1 ?

Please find attached screenshot of the chart rendered using the above settings.

Hope this helps !

Happy FusionCharting :D

Attached thumbnail(s)

  • Attached Image: CaptureFusionChartsFree.PNG

Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/

Thank you,
Bindhu

Follow us <http://http//twitter.com/fusioncharts> @Twitter!
0

Other Replies To This Topic

#7 User is offline   marcfromm 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 07-February 12

Posted 09 February 2012 - 06:03 PM

View PostBindhu, on 09 February 2012 - 03:50 AM, said:

Can you please let us know the version of FusionCharts that you are currently using ?

FusionCharts Free v2.2
Released: Aug 2009

Quote

please try using 'rotateNames' attribute of the chart and set it to 1


Yes this worked. All my searching and topics only mentioned the labelDisplay attribute.

Thanks
0

Other Replies To This Topic

#8 User is offline   Bindhu 

  • Forum Guru
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 224
  • Joined: 24-November 11
  • LocationBangalore

Posted 10 February 2012 - 03:36 AM

Hi,

Thank you for the response.

We are glad to know that the solution worked.

Happy FusionCharting :D
Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/

Thank you,
Bindhu

Follow us <http://http//twitter.com/fusioncharts> @Twitter!
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic