tyousef
Members-
Content count
4 -
Joined
-
Last visited
Everything posted by tyousef
-
Hello: I'm using the latest version of Fusionwidgets and I'm having difficulty with the following task: I'm using vb.net and I want to create a dynamic fusionwidget guage from code behind in asp.net page. Here is what I have in the aspx page: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="testGuage.aspx.vb" Inherits="liveChartsDemo_testGuage" %> <html xmlns="[url="http://www.w3.org/1999/xhtml"]http://www.w3.org/1999/xhtml[/url]"> <head id="Head1" runat="server"> <script type="text/javascript" src="../FusionWidgets/FusionCharts.js"></script> <title></title> </head> <body> <form id="form1" runat="server"> <asp:Literal ID="FCLiteral" runat="server"></asp:Literal> </form> </body> </html> So I'm using a literal control that I will later fill in from the code behind page. which has the following code: Imports InfosoftGlobal Partial Class liveChartsDemo_testGuage Inherits System.Web.UI.Page Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Dim strxml As String strxml = "" strxml = strxml & "<chart lowerLimit='0' " strxml = strxml & "upperLimit='100' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%' tickValueDistance='20' showValue='1' decimals='0'>" strxml = strxml & "<colorRange>" strxml = strxml & "<color minValue='0' maxValue='75' code='FF654F'/>" strxml = strxml & "<color minValue='75' maxValue='90' code='F6BD0F'/>" strxml = strxml & "<color minValue='90' maxValue='100' code='8BBA00'/>" strxml = strxml & "</colorRange>" strxml = strxml & "<dials>" strxml = strxml & "<dial id='CPU1' value='92' rearExtension='10' toolText='CPU 1 Usage'/>" strxml = strxml & "</dials>" strxml = strxml & "<styles>" strxml = strxml & "<definition>" strxml = strxml & "<style type='font' name='myValueFont' bgColor='F1f1f1' borderColor='999999' />" strxml = strxml & "</definition>" strxml = strxml & "<application>" strxml = strxml & "<apply toObject='Value' styles='myValueFont' />" strxml = strxml & "</application>" strxml = strxml & "</styles>" strxml = strxml & "</chart>" FCLiteral.Text = FusionCharts.RenderChart("../FusionWidgets/AngularGauge.swf", "", strxml, "MyMainChart", "600", "350", False, False) End Sub End Class Now all what I get when I browse to the page is the div tag content "Chart." I have no idea why this is happening, the content that is getting to the literal control is correct with all necessary data for the chart, all pathes are verified to the js, swf, etc.... It works fine if I do it from the aspx page as in: <div id="chartdiv" align="center">FusionGadgets</div> <script type="text/javascript"> var myChart = new FusionCharts("../FusionWidgets/AngularGauge.swf", "myChartId", "270", "270", "0", "0"); myChart.setDataURL("path of xml file here"); myChart.render("chartdiv"); </script> I cannot do that in my app because the number of Guages I want to create varies depending on how many devices I'm trying to monitor using these guages. thanks for the help!
-
Adding Fusionwidget From Asp.net Code Behind
tyousef replied to tyousef's topic in Using FusionWidgets XT
I got it to work, BUT this does not make any sense: There are two FusionCharts.js files: one in FusionWidgets folder that came with FusionWidget Enterprise and another one in FusionCharts Folder from FusionCharts XT package, The issue have gone away when I used the file from FusionCharts folder!!! From what I understand, realtime guages are part of the widgets and I was using the js from FusionWidget folder. Why I need to replace the JS file with the Charts XT version? this does not make any sense.... -
Adding Fusionwidget From Asp.net Code Behind
tyousef replied to tyousef's topic in Using FusionWidgets XT
The JS error showing in both IE and Chrome is: Object doesn't support property or method 'setAttribute' FusionCharts.js, line 27 character 12 , when I navigate to the js file, here is the line where the error is: if(swf) { this.setAttribute('swf', swf); } if(id) { this.setAttribute('id', id); } you can simply take my code and create a project on your side, and try to recreate the problem. -
iphone+widgets, when?! is that something that will be rolled out along with html5? thanks.