conoscete un sistema per fre decentemente un grafico a barre tag table, td e tr ???
io ho fatto una cosa del genere ma sto fumando il cervello perchè qualcosa non mi quadra ... posta il codice e ben venga chi sa apportare modifiche e/o osservazioni
codice:<html> <head> <title><%=TITLE_BOPAGES%></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="_css/bostyle.css" rel="stylesheet" type="text/css"> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <body> <% HeightPixelTable = 300 XmaxValue = 300 XminValue = 0 FasciaXmin = 50 FasciaXmax = 140 XParameter = "R/s" YParameter = "t" nSampling = 7 SeparatoreArray = "%v" ArrayX = "1%v2%v3%v4%v5%v6%v7" ArrayY = "33%v55%v22.5%v16.33%v190%v77.43%v55" function DisegnaGraficoHtml(nSampling,SeparatoreArray,ArrayX,ArrayY,XmaxValue,XminValue,XParameter,YParameter,FasciaXmin,FasciaXmax,HeightPixelTable) Xrange = XmaxValue - XminValue ValueAlto = (HeightPixelTable * FasciaXmax)/XmaxValue ValueBasso = (HeightPixelTable * FasciaXmin)/XmaxValue DiffValueBassoAlto = ValueAlto - ValueBasso FirstLevelPixel = 100 - ValueAlto 'response.write ValueAlto & " " 'response.write FirstLevelPixel & " " 'response.write DiffValueBassoAlto & " " 'response.write ValueBasso & " " %> <table width="500" border="0" cellpadding="0" cellspacing="0" class="table_grafico" height="<%=HeightPixelTable%>"> <tr> <td height="20" align="right"><span class="testo_grafico_v"><%= XParameter%></span></td> <td colspan="<%= nSampling%>"></td> <td colspan="3"></td> </tr> <tr> <td height="20" valign="bottom"><span class="testo_grafico_v"><%= XmaxValue%></span></td> <td colspan="<%= nSampling%>"></td> <td colspan="3"></td> </tr> <tr> <td width="2" height="100%" class="table_grafico_linea_verticale" valign="top" align="right"> <!-- <table height="<%'=ValueBasso%>%"><tr><td align="right" valign="top"><span class="testo_grafico_v"><%'=FasciaXmax%></span></td></tr></table> --> <table height="<%'=DiffValueBassoAlto%>%" ><tr><td align="right"></td></tr></table> <!-- <table height="<%'=FirstLevelPixel%>%"><tr><td align="right" valign="top"><span class="testo_grafico_v"><%'=FasciaXmin%></span></td></tr></table> --> </td> <td width="45" class="table_grafico_linea_orizzontale" valign="bottom" align="left"> <table width="7" align="left" cellpadding="3" cellspacing="0"> <tr> <td valign="bottom"></td> </tr> </table> <span class="testo_grafico"></span> </td> <% ArrayY_Result = Split(ArrayY,SeparatoreArray) for j=0 to ubound(ArrayY_Result) ValueToPrint = ArrayY_Result(j) PercValuetoprint = (ValueToPrint*100) / Xrange 'response.write PercValuetoprint & " - " &ValueToPrint & " - " & Xrange PercValuetoprint = (Mid(PercValuetoprint, 1, 2))*2 %> <td width="50" height="<%=HeightPixelTable%>" class="table_grafico_linea_orizzontale" valign="bottom" align="left"> <table width="7" align="left" cellpadding="3" cellspacing="0"> <tr> <td valign="bottom">[img]images/barragrafico.gif[/img]"></td> </tr> </table> <span class="testo_grafico"><%=ValueToPrint%></span> </td> <% next %> <td width="10" class="table_grafico_linea_orizzontale" valign="bottom" align="right"></td> <td width="5" valign="bottom" align="right"></td> </tr> <tr> <td height="20" valign="top" align="right"><span class="testo_grafico_v">0</span></td> <% ArrayX_Result = Split(ArrayX,SeparatoreArray) for j=0 to ubound(ArrayX_Result) ValueToPrint = ArrayX_Result(j) %> <td valign="top" align="right"><span class="testo_grafico_v"><%=ValueToPrint%></span></td> <% next %> <td valign="top" align="right"></td> <td colspan="2" align="right"><span class="testo_grafico_v"><%= YParameter%></span></td> </tr> </table> <% end function response.write "<h1>grafico</hi> " call DisegnaGraficoHtml(nSampling,SeparatoreArray,ArrayX,ArrayY,XmaxValue,XminValue,XParameter,YParameter,FasciaXmin,FasciaXmax,HeightPixelTable) %> </body> </html>

Rispondi quotando