|
|
|
Forum 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 strDataURLreturn 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 strDataURLreturn 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
|
|
|
|
|
Supreme 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
|
|
|
|
|
Forum 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 strDataURLreturn FusionCharts.RenderChart("../FusionCharts/SSGrid.swf?showPercentValues=1&showShadow=1", dataURL, "", "TypeGrid", "350", "90", false, false);} Thanks again! Scott
|
|
|
|