thoth

Members
  • Content count

    19
  • Joined

  • Last visited

About thoth

  • Rank
    Junior Member
  1. AWESOME!...Works fine now! You have been most hopeful, Thank you very much!!!
  2. I am trying to use a mixture of fusioncharts and widgets on the same page. I like to add the charts (column, bar, pie ect.) in the code-behind using data readers and strings...this is working great for the charts. But now I'm trying to use a similar method to implement some widgets, more specifically, an angular gauge. The code below appears to function just fine, but for some reason I keep getting a javascript error in I.E. (the annoying little error icon that appears on the bottom left corner of the browser). The error says "Error: Expected ')' Code: 0...Line 1 Character 49" I'm not sure what is causing the error, the gauge appears to function properly but the error is annoying. Here is the code that brings up the gauge in my code-behind... private void MedianGauge(){ string strSQL7 = "SELECT COUNT(*) AS [MEDHITS] FROM Combined_History WHERE EXACT = 589 AND EXACTSKIP <=693";DbConn oRs7 = new DbConn(strSQL7); //xmlData1 will be used to store the entire XML document generated by StringBuilder StringBuilder xmlData1 = new StringBuilder(); //Generate the chart element xmlData1.Append("<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='OVER' upperLimitDisplay='UNDER' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%25' tickValueDistance='20' showValue='1'>"); xmlData1.Append("<colorRange>"); xmlData1.Append("<color minValue='0' maxValue='50' code='FF654F'/>"); xmlData1.Append("<color minValue='50' maxValue='90' code='F6BD0F'/>"); xmlData1.Append("<color minValue='90' maxValue='100' code='8BBA00'/>"); xmlData1.Append("</colorRange>"); xmlData1.Append("<dials>"); oRs7.ReadData.Read(); { xmlData1.AppendFormat("<dial value='{0}' rearExtension='10'/>", oRs7.ReadData["MEDHITS"].ToString()); } xmlData1.Append("</dials>"); xmlData1.Append("</chart>"); //outPut will store the HTML of the chart rendered as string //when an ajax call is made we use RenderChartHTML method string outPut7 = "";outPut7 = FusionCharts.RenderChartHTML("../../FusionCharts/AngularGauge.swf", "", xmlData1.ToString(), "MedianHitGauge", "330", "200", false, false); //Clear panel which will contain the chart Panel6.Controls.Clear(); //Add Litaral control to Panel which adds the chart from outPut string Panel6.Controls.Add(new LiteralControl(outPut7));Ive tried changing many things to see if I could get rid of the error. Nothing has worked and I can't pinpoint it. Is there something wrong with rendering the gauge using... FusionCharts.RenderChartHTML("../../FusionCharts/AngularGauge.swf", "", xmlData1.ToString(), "MedianHitGauge", "330", "200", false, false); If someone could point me in the right direction I would greatly appreciate it. Or, if there is a better way to render the chart from the code-behind, please show an example.
  3. I have a FusionWidget Angular Gauge, I call it up in the code behind the same exact way I do for some of my Fusion Charts. The code below works and the gauge appears on the screen, however, internet explore still shows the little error icon in the bottom left corner of the web browser: I can't seem to figure out whats causing this so maybe someone can look at the relevent code and help: private void MedianChartDefault() { //xmlData will be used to store the entire XML document generatedStringBuilder StringBuilder xmlData = new StringBuilder(); //Generate the chart element xmlData.Append("<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='OVER' upperLimitDisplay='UNDER' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%25' tickValueDistance='20' showValue='1'>"); xmlData.Append("<colorRange>"); xmlData.Append("<color minValue='0' maxValue='50' code='FF654F'/>"); xmlData.Append("<color minValue='50' maxValue='90' code='F6BD0F'/>"); xmlData.Append("<color minValue='90' maxValue='100' code='8BBA00'/>"); xmlData.Append("</colorRange>"); xmlData.Append("<dials>"); xmlData.Append("<dial value='50' rearExtension='10'/>"); xmlData.Append("</dials>"); xmlData.Append("</chart>"); //outPut will store the HTML of the chart rendered as string //when an ajax call is made we use RenderChartHTML methodstring string outPut6 = ""; outPut6 = FusionCharts.RenderChartHTML("../../FusionCharts/AngularGauge.swf", "", xmlData.ToString(), "MedianHitGauge", "330", "200", false, false); //Clear panel which will contain the chart Panel6.Controls.Clear(); //Add Litaral control to Panel which adds the chart from outPut string Panel6.Controls.Add(new LiteralControl(outPut6)); } I hope someone knows the answer. I've been working on it for going on 3 hours now and to no avail.
  4. I solved it...numberSuffix='%' needed changed to numberSuffix='%25'
  5. Ive been using datareaders and strings to produce most of my charts in the code-behinds of my aspx pages. I'm getting the hange of if for the FusionCharts but I cant seem the do the same with a gauge. private void MedianChart() { //xmlData will be used to store the entire XML document generated StringBuilder xmlData = new StringBuilder(); //Generate the chart element xmlData.AppendFormat("<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='Bad' upperLimitDisplay='Good' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%' tickValueDistance='20' showValue='1'>"); xmlData.Append("<colorRange>"); xmlData.Append("<color minValue='0' maxValue='75' code='FF654F'/>"); xmlData.Append("<color minValue='75' maxValue='90' code='F6BD0F'/>"); xmlData.Append("<color minValue='90' maxValue='100' code='8BBA00'/>"); xmlData.Append("</colorRange>"); xmlData.Append("<dials>"); xmlData.Append("<dial value='75' rearExtension='10'/>"); xmlData.Append("</dials>"); xmlData.Append("</chart>"); //outPut will store the HTML of the chart rendered as string //when an ajax call is made we use RenderChartHTML method string outPut2 = ""; outPut2 = FusionCharts.RenderChartHTML("../../FusionCharts/AngularGauge.swf", "", xmlData.ToString(), "MedianHitGauge", "330", "300", false, true); //Clear panel which will contain the chart Panel6.Controls.Clear(); //Add Litaral control to Panel which adds the chart from outPut string Panel6.Controls.Add(new LiteralControl(outPut2)); } This doesnt work for the widget angular gauge. I get an error saying "invalid XML data". I have managed to use the data url method and set the url to an aspx page that generates XML but I what I really need to do is something similar to above that can be directly placed in the pages code-behind. Eventually, I want to add a data reader to pull the values for the dial from a database (based on a parameter that is passed to it). Are there any examples I can work with. There not really anything in the widget documentation on using c# and asp.net. Any help would be great
  6. You set the Z-index using css either in your style sheet or inline....your css is in control of the actual layering. Try wrapping your chart in a wrapper div. For example: <td valign="top"> <div id="chartdiv" align="center" style="position: relative; top: 0px; left: 0px; z-index: 1;"></div> <script type="text/javascript"> var myChart = new FusionCharts("Charts/Column3D.swf", "myChartId", "800", "550", "0", "0");myChart.setDataURL( "Data/Stats.xml");myChart.render( "chartdiv"); </script> <img src="map.png" border="0" alt="" usemap ="#StatsMap" style="position: absolute; top: 40px; left: 0px; z-index: 2;"/></div> </td>The sample above has a main wrapper DIV with a z-index of 0. Inside that div is another div with the ID chartdiv...its z-index is set to 1 and it is the div the chart is rendered in. Also inside the main wrapper div is an image (in this example it's an image map) that has a z-index of 2. The image map is placed on top the chart when its renederd to a browser. You'll have to play with the css to fix your problem. You'll need to set the z-index of your chart to a number which is lower than whatever is being displayed ontop of it.
  7. just remeber to reference on your page instead of the FusionCharts.js file. Example: < script language="javascript" type="text/javascript" src="FusionCharts/FusionChartsWMode.js"></script>
  8. Try this. I think it should work with what you have. It solved my Z-index problems. http://www.fusioncharts.com/Downloads/FusionChartsWMode.zip
  9. I have a column3d chart and I want to place two or three JavaScript functions in a single link. (each column on the chart contains a link). Is this possible and if so how can it be done? My current link looks like this: string link = "javascript:updateChart(%26apos;" + oRs.ReadData["STRAIGHT"].ToString() + "%26apos;)"; I want the link to contain 2 or 3 functions, something like... string link = "javascript:updateChart(%26apos;" + oRs.ReadData["STRAIGHT"].ToString() + "%26apos;)" AND javascript:updateStats(%26apos;" + oRs.ReadData["STRAIGHT"].ToString() + "%26apos;)"; Is it possible and what would the correct syntax be?
  10. U need to download FusionChartsWMode.js and use that instead of the standard FusionCharts.js file. It will allow you to set the z-index...the standard js file does not.
  11. Well I seemed to have found a solution in a different post. I changed the link to: // create link to javascript function for ajax post back call string link = "javascript:updateChart(%26apos;" + oRs.ReadData["STRAIGHT"].ToString() + "%26apos;)";this works fine now.
  12. I have a strange and annoying problem that I cannot seem to solve on my own. I have a column3d bar chart and each column contains a link. The links are supposed to update a gridview that resides below the chart. The link in each column is essentially supposed to be a 3-digit number that ranges anywhere from 000 to 999. The problem is that any links that start with a leading "0" (numbers such as 010, 048, 061, 070) dont seem to function properly. All the columns/links that start with any digit besides "0" work fine, but when clicking on any columns that start with a "0" returns no-results to the gridview! I am at a loss on what to do! I can perform manual queries (using leading digit "0" in SQL Server Managment Studio and even hard code them on my page using the same data reader / line of code that the chart and gridview are using and the queries work fine. But when I try to pass the parameter as a link in the chart, any columns starting with "0" don't work. The links in the columns pass the 3 digit number as a parameter using the following code: //Iterate through database while (oRs.ReadData.Read()){ // create link to javascript function for ajax post back call string link = "javascript:updateChart(" + oRs.ReadData["STRAIGHT"].ToString() + ")"; //Create set element strXML.AppendFormat("<set label='{0}' value='{1}' toolText=' {0} hit {1} times. ' link='{2}' />", oRs.ReadData["STRAIGHT"].ToString(), oRs.ReadData["LIFETIME"].ToString(), link); } The event handler that catches the parameter on postback is..... protected void Page_Load(object sender, EventArgs e){ //This will execute first time the page loads and not on ajax post back calls if (!IsPostBack){ ChangeChart(); GameCount(); GridViewDefaults(); } else { // Handle Ajax PostBack Call // store Asp.Net Ajax special HTTP request // __EVENTARGUMENT holds value passed by JS function -__doPostBack //The value can be like "drillDown$1" //We take $ as delimiter so we get drillDown as the function to call //and 0 as the factory id. It can vary depending on the pie slice clicked. String sEventArguments = Request["__EVENTARGUMENT"]; if (sEventArguments != null){ //extract arguments passed to the HTTP Request Int32 iDelimiter = sEventArguments.IndexOf('$'); String sArgument = sEventArguments.Substring(iDelimiter + 1); // extract the name of the post back function if (sEventArguments.StartsWith("LifetimeGrid")){ // call the post back function passing the argument(s) LifetimeGrid(sArgument);} } } } The code all resides in the code-behind. In the main .aspx page I have the following relevent code for the chart... <td class="ChartArea" colspan="2"> <script language="javascript" type="text/javascript"> function updateChart(STRAIGHT){ __doPostBack( "<%=Panel3.UniqueID%>","LifetimeGrid$" + STRAIGHT);} </script> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate>.....I should probably mention that the relevent database columns are all set as varchar(3) in all the tables that are used in the queries. You can view the page and chart here: http://stats.active-lotto.com/Ohio/Straights/LifetimeFrequency.aspx To see the problem select "Top 20", then choose "Midday" from the dropdown list and click "Go". Notice that when you click any columns that represent numbers starting with "0", you get no results in the gridview below, yet all other columns work fine. Ill be pullin my hair out on this one. I'm not sure what the cause of this problem is or how to correct it. Any help would greatly be appreciated.
  13. Charts and Z index

    I need to apply z-index layering to some charts, I download the FusionChartsWMode.js file but I have no idea how this is to be used. I embed by charts using java as follows... <div id="chartdiv" align="center"></div> <script type="text/javascript"> var myChart = new FusionCharts("Charts/Column3D.swf", "myChartId", "800", "550", "0", "0");myChart.setDataURL( "Data/Flower.xml");myChart.render( "chartdiv"); </script>How is FusionChartsWMode supposed to be use? Any help would be appreciated
  14. Hello. I have a chart in which one of the bars has a link set to an iframe. Here is the relevent code in my XML file that the chart is using for its data: < set label='2-01' value='10' link='F-test-treatmentsBig.html' />Here is the relevent code for the page that contains the iframe: </td> <td valign="top"> <iframe src="treatments.html" width="500px" height="500px" name="test" id="test" class="Frame"></iframe> </td>I have the iframe's id and name set to "test" and also have it set to test in the XML, yet the page opens in another tab in my web browser. I dont understand why this is occurring. Im using the latest version of FireFox. These are basic html pages running on a local machine...(not on the internet or web server). I can hard code a link such as <a href="treatmentsBig.html" target="test">link</a> and it works, but the link from the chart does not. What gives? If anyone can help i'd sure appreciate it. Thanks Scott