Jump to content
Software FX Community

Pie Chart Colors

User (Legacy)

Recommended Posts

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.



' 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





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


Chart.CloseData COD_VALUES


<%= chart.GetHtmlTag("500","500") %>

<!-- Custom Legend Table -->



for jCnt = 0 to lCnt



<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>







Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...