How to Use Grid Components with ASP.NET C# HELP
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



How to Use Grid Components with ASP.NET C#... Expand / Collapse
Author
Message
Posted 4/29/2008 11:01:50 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/31/2008 7:20:20 PM
Posts: 6, Visits: 18
Hello, Im trying out Fusion Charts. Im using ASP.net and C#. I want to use the Grid Component with a Pie chart. I'm using the DataURL method. The Grid is setup to use the same dataURL as the Pie chart and it works fine. However, I'm not sure how to pass parameters to the grid. I want to "showPercentValues" but the tutorial only shows the basic java/html example:

   <script type="text/javascript">
      var myGrid = new FusionCharts("../FusionCharts/SSGrid.swf", "myGrid1", "300", "200", "0", "0");
      myGrid.setDataURL("Data.xml");
      //Set Grid specific parameters
      myGrid.addVariable('showPercentValues', '1');
      myGrid.addVariable('showShadow', '1');
      myGrid.render("griddiv");
   </script>

On my aspx page, the chart and grid are in literals as follows:


<table cellpadding="4" cellspacing="0" border="1px">
<tr>
    <td bgcolor="#efefef">COMBINATION TYPES: LIFETIME HITS</td>
</tr>
<tr>
   
<td><%=GetTypeCountChartHtml()%></td>
</tr>
<tr>
   
<td><%=GetTypeCountGridHtml()%></td>
</tr>
</table>

In the .aspx.cs page, I have:

public string GetTypeCountChartHtml()

{

String dataURL = Server.UrlEncode("TypeCount.aspx?animate=1");

//Create the chart - Pie 3D Chart with dataURL as strDataURL

return FusionCharts.RenderChart("../FusionCharts/Pie3D.swf", dataURL, "", "TypeCount", "350", "250", false, false);

}

public string GetTypeCountGridHtml()

{

String dataURL = Server.UrlEncode("TypeCount.aspx");

//Create the Grid For the Pie 3D Chart with dataURL as strDataURL

return FusionCharts.RenderChart("../FusionCharts/SSGrid.swf", dataURL, "", "TypeGrid", "350", "90", false, false);

}

}

How do I pass parameters (like showPercentValues and showShadow) to the grid. I'm new to asp and c#. Any help would be appreciated.

Thanks,

Scott

Post #6006
Posted 4/30/2008 2:48:39 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 4:56:35 AM
Posts: 706, Visits: 1,143
Hi,

Could you please try once passing these attributes along with the chart swf name building querystring?

e.g.

"SSGrid.swf?showPercentValues=1&showShadow=1"

 

Regards,

Sudipto Choudhury
FusionCharts Team

Post #6021
Posted 5/1/2008 9:57:59 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 5/31/2008 7:20:20 PM
Posts: 6, Visits: 18
Hi there and thanks! I passed the parameters as follows and it works!

public string GetTypeCountGridHtml()

{

String dataURL = Server.UrlEncode("TypeCount.aspx?");

//Create the chart - Pie 3D Chart with dataURL as strDataURL

return FusionCharts.RenderChart("../FusionCharts/SSGrid.swf?showPercentValues=1&showShadow=1", dataURL, "", "TypeGrid", "350", "90", false, false);

}

Thanks again!

Scott

Post #6052
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 11:01am


Execution: 0.047.