on 10-31-2007 2:07 PM
Hi
I want to take the colour from a range in custom chart and use it to set the backgroundColor of a cell in an HTML table.
I tried
var graph=document.appGraph.getChartObject()
tab1.rows[1].cells[1].style.backgroundColor = graph.getPenColor(1)
but it doesn't work, because the getPenColor returns the following
java.awt.Color[r=255,g=0,b=0]
how do I either return a hex colour code, or convert this to a hex code?
Thanks
Nick
Found it!
color = graph.getPenColor(1)
colorString="rgb(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ")"
tab1.rows[1].cells[1].style.backgroundColor = colorString
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.