User (Legacy) Posted February 20, 2002 Report Share Posted February 20, 2002 I would like to build my own legend with HTML. How do I get the pie colors. I have tried HEXChart.Color(jcnt) but the colors do not match the legends, they are out of order. Thanks ... ' Load working array with dataset values while not oRS.EOF vItems(0, lCnt) = oRS("ip_address") vItems(1, lCnt) = oRS("ip_dns_name") vItems(2, lCnt) = oRS("connections") vItems(3, lCnt) = oRS("bytes") lCnt = lCnt + 1 oRS.MoveNext wend ... ... Chart.OpenDataEx COD_VALUES,1,lCnt For jCnt = 0 to lCnt Chart.Axis(AXIS_X).Label(jCnt) = vItems(0, jCnt) Chart.ValueEx(0,jCnt) = (cDBL(vItems(3, jCnt))/cDBL(totalBytes)) * 100 next Chart.CloseData COD_VALUES %> <%= chart.GetHtmlTag("500","500") %> <!-- Custom Legend Table --> <table> <% for jCnt = 0 to lCnt %> <tr> <td bgcolor=<%=HEX(Chart.Color(jcnt))%>> </td> <td><%=vItems(0, jCnt)%></td> <td><%=vItems(1, jCnt)%></td> <td><%=vItems(2, jCnt)%></td> <td><%=vItems(3, jCnt)%></td> </tr> <% next %> </table> .... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.