I'm trying FusionWidgets v3 AngularGauge on my vb ASP.NET page. I used it like, I downloaded from support site.
My problem is: I want to show more than one widget on my page but first is showed, second is not. There is written "Chart." on the chart's place. I cancel first widget on the code and second works properly.
What must I do?
My code like this :
Default.aspx
<td class="style14" colspan="2"><b>1.Fabrika Kalitesi<%=GrafikKaliteFab1(txtTarih.Text)%></b></ td><td class="style14" colspan="2"><b>2.Fabrika Kalitesi<%=GrafikKaliteFab2(txtTarih.Text)%></b></ td>------------------------------------------------------------------ ------------------------------------------------------
Default.aspx.vb
Public Function GrafikKaliteFab1(ByVal Tarih As String) As StringDim dataURL As StringdataURL = Server.UrlEncode(
"DataGen.aspx?op=kalitefab1&tarih=" & Tarih)Return FusionCharts.RenderChart("Charts/AngularGauge.swf", dataURL, "", "Kalite", "350", "200", False, True)'FusionCharts("Charts/AngularGauge.swf", "myChartId", "350", "200", "0", "0");End FunctionPublic Function GrafikKaliteFab2(ByVal Tarih As String) As StringDim dataURL As StringdataURL = Server.UrlEncode(
"DataGen3.aspx?op=kalitefab2&tarih=" & Tarih)Return FusionCharts.RenderChart("Charts/AngularGaugeorj.swf", dataURL, "", "Kalite", "350", "200", False, True)'FusionCharts("Charts/AngularGauge.swf", "myChartId", "350", "200", "0", "0");End Function----------------------------------------------------------------------------- -------------------------------------------
datagen.aspx
Imports
System.Data.SqlClientImports
FonksiyonlarPartial
Class DataGenInherits System.Web.UI.PagePublic DataCon As SqlConnectionPublic strSQL As StringProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.LoadDim op As StringDim Tarih As StringDim Fabrika As IntegerTarih = Request(
"tarih")op = Request(
"op")'Tarih = "08.02.2010"'op = "kalitefab"'Fabrika = 1Select Case opCase "kalitefab1"KaliteFab1(Tarih)
Case "kalitefab2"KaliteFab2(Tarih)
End Select'DataCon.Close()' DataCon.Dispose()End SubPublic Sub KaliteFab1(ByVal Tarih As String)Dim strXML As StringDim Kalite As IntegerstrSQL =
"SELECT CONVERT(INT,((SUM(BIRINCI)+SUM(FIRST_))/(SUM(BIRINCI)+SUM(FIRST_)+SUM(IKINCI)+SUM(DEFO)+SUM(DENEME))*100)) AS KALITE FROM ZY2 WHERE ISLEMTIP=13 AND FABRIKA =1 AND TARIH='" & TarihDonusturSQL(Tarih) & "'"Dim Con As New SqlConnection(ConStr)TryCon.Open()
Dim Cmd As New SqlCommand(strSQL, Con)Dim Dr As SqlDataReaderDr = Cmd.ExecuteReader
While Dr.ReadKalite = Dr(0)
End WhileCatch ex As ExceptionResponse.Write(
"Fabrika kalite grafii hatas : " & ex.Message)FinallyCon.Close()
Con =
NothingEnd TrystrXML =
"<chart palette='2' bgAlpha='0' bgColor='FFFFFF' lowerLimit='0' upperLimit='100' numberSuffix='%25' showBorder='0' basefontColor='FFFFDD' chartTopMargin='25' chartBottomMargin='25' chartLeftMargin='25' chartRightMargin='25' toolTipBgColor='009999' gaugeFillMix='{dark-10},{light-70},{dark-10}' gaugeFillRatio='3' pivotRadius='8' gaugeInnerRadius='50%' tickValueDistance='20' title='guLsum'>"strXML = strXML &
"<colorRange>"strXML = strXML &
"<color minValue='0' maxValue='65' code='FF0000' /> "strXML = strXML &
"<color minValue='66' maxValue='75' code='FFCC00' /> "strXML = strXML &
"<color minValue='76' maxValue='85' code='FFFF00' /> "strXML = strXML &
"<color minValue='86' maxValue='90' code='00FF00' /> "strXML = strXML &
"<color minValue='91' maxValue='100' code='009933' /> "strXML = strXML &
"</colorRange>"strXML = strXML &
"<dials id='Kalite'>"strXML = strXML &
"<dial value='" & Kalite & "' rearExtension='10' baseWidth='10' /> "strXML = strXML &
"</dials>"'strXML = strXML & " <trendpoints> <point value='62' displayValue='Average' useMarker='1' markerRadius='8' dashed='1' dashLen='2' dashGap='2' /> </trendpoints>"strXML = strXML &
" <annotations>"strXML = strXML &
" <annotationGroup id='Grp1' showBelow='1'>"strXML = strXML &
" <annotation type='rectangle' x='5' y='5' toX='345' toY='195' radius='10' color='009999,333333' showBorder='0' /> "strXML = strXML &
" </annotationGroup>"strXML = strXML &
" </annotations>"strXML = strXML &
" <styles> <definition>"strXML = strXML &
" <style name='RectShadow' type='shadow' strength='3' /> "strXML = strXML &
" <style name='trendvaluefont' type='font' bold='1' borderColor='FFFFDD' /> "strXML = strXML &
" </definition>"strXML = strXML &
" <application>"strXML = strXML &
" <apply toObject='Grp1' styles='RectShadow' /> "strXML = strXML &
" <apply toObject='Trendvalues' styles='trendvaluefont' /> "strXML = strXML &
" </application> </styles>"strXML = strXML &
"</chart>"Response.ContentType =
"text/xml"Response.Write(strXML)
Thanks.
Engin

Back to top
MultiQuote