Chart Scaling - Pie2d
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Chart Scaling - Pie2d Expand / Collapse
Author
Message
Posted 8/20/2008 9:47:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/10/2008 11:31:15 AM
Posts: 8, Visits: 18
Ran into an issue when dsiplaying 2 Pie2d side by side.

Even though the chart size is exactly the same. When the chart is drawn, it's taking the label names/values as precedent and makes the chart larger or smaller depending on the labels and values.

The result is 2 charts with the same labels but differenet values is dsiplayed in 2 sizes.

If I turn the values off. The charts are the same size.

Is there any way to force the code to set the space required for labels/values to taker a lower precedent and have the chart be sized first and than have the labels/values use the remaining space?

Please see screenshot for example

Here is the code.

<%
 'In this example, we show how to connect FusionCharts to a database.
 'For the sake of ease, we've used an Access database which is present in
 '../DB/FactoryDB.mdb. It just contains two tables, which are linked to each
 'other.
  
 'Database Objects - Initialization
 Dim oRs, oRs2, strQuery
 'strXML will be used to store the entire XML document generated
 Dim strXML
 
 'Create the recordset to retrieve data
 Set oRs = Server.CreateObject("ADODB.Recordset")

 'Generate the chart element
 
 
 strXML = "<chart caption='Count of Open Records by Queue Type HFD' subcaption='Previous Day (Click on Chart for Detail)' showlabels='1' showvalues='1' showBorder='0' formatNumberScale='0' slantLabels='0' useRoundEdges='1' skipOverlapLabels='0' clickurl='f-main-http://cskdev03/ccx/FusionCharts/FusionCharts_Evaluation/Code/ASP/DBExample/eBins_HFD_QN_Open.asp'>" 
'Iterate
 strQuery = "select * from QT_Open_HFD_Master"
 Set oRs = oConn.Execute(strQuery)
 
 While Not oRs.Eof
  'Now create second recordset to get details for this factory
  Set oRs2 = Server.CreateObject("ADODB.Recordset")
  strQuery = "select sum(countofactivityid) as TotOutput from QT_Open_HFD_Output where Graph_ID=" & ors("Graph_ID")
  Set oRs2 = oConn.Execute(strQuery)    
  'Generate <set label='..' value='..' />  
  strXML = strXML & "<set label='" & ors("QueueType") & "' value='" & ors2("TotOutput") & "' />"
  'Close recordset
  Set oRs2 = Nothing
  oRs.MoveNext
 Wend
 'Finally, close <chart> element
 strXML = strXML & "</chart>"
 Set oRs = nothing
 
 'Create the chart - Pie 3D Chart with data from strXML
 Call renderChart("../../FusionCharts/pie2d.swf", "", strXML, "Chart_1", 400, 330, false, false)
%></td>
  <td><% 
 
 'Create the recordset to retrieve data
 Set oRs = Server.CreateObject("ADODB.Recordset")


 
 
 strXML = "<chart caption='Count of Closed Records by Queue Type HFD' subcaption='Previous Day (Click on Chart for Detail)' showlabels='1' showvalues='1' showBorder='0' formatNumberScale='0' slantLabels='0' useRoundEdges='1' skipOverlapLabels='0' clickurl='f-main-http://cskdev03/ccx/FusionCharts/FusionCharts_Evaluation/Code/ASP/DBExample/eBins_HFD_QN_Closed.asp'>"
 
 'Iterate through each factory
 strQuery = "select * from QT_Closed_HFD_Master"
 Set oRs = oConn.Execute(strQuery)
 
 While Not oRs.Eof
  'Now create second recordset to get details for this factory
  Set oRs2 = Server.CreateObject("ADODB.Recordset")
  strQuery = "select sum(countofqueue_name) as TotOutput from QT_Closed_HFD_Output where Graph_ID=" & ors("Graph_ID")
  Set oRs2 = oConn.Execute(strQuery)    
  'Generate <set label='..' value='..' />  
  strXML = strXML & "<set label='" & ors("QueueType") & "' value='" & ors2("TotOutput") & "' />"
  'Close recordset
  Set oRs2 = Nothing
  oRs.MoveNext
 Wend
 'Finally, close <chart> element
 strXML = strXML & "</chart>"
 Set oRs = nothing
 

 
 Call renderChart("../../FusionCharts/pie2d.swf", "", strXML, "Chart_2", 400, 330, false, false)


  Post Attachments 
pie_scaling.JPG (7 views, 28.71 KB)

Post #8057
Posted 8/21/2008 1:02:20 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Yesterday @ 11:37:05 PM
Posts: 732, Visits: 2,190
hi,

 Could you please try chart's  pieRadius attribute to set and fix the radius of the pie Chart?

eg. <chart  pieRadius='40' > or <chart pieRadius='60' >

pieRadius Number In Pixels

This attribute lets you explicitly set the outer radius of the chart. FusionCharts automatically calculates the best fit pie radius for the chart. This attribute is useful if you want to enforce one of your own values.

 



Thanks,
Arindam

FusionCharts Team
www.fusioncharts.com

Post #8072
Posted 8/21/2008 8:42:33 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/10/2008 11:31:15 AM
Posts: 8, Visits: 18
Worked perfectly...thanks for the quick response.

Another question...Is there a reference for all the switches to the charts in the documentation? I looked at the reference for the Chart Elements and did not see this one listed.

I'm using the full version.

Thanks

Post #8087
Posted 8/22/2008 12:08:15 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Yesterday @ 11:37:05 PM
Posts: 732, Visits: 2,190
hi,
 Yes, please see this link you can get all charts reference over there.

http://www.fusioncharts.com/docs

Thanks,
Arindam

FusionCharts Team
www.fusioncharts.com

Post #8092
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 3:58am


Execution: 0.094.