I have to make an pie chart
Can you help?
best regards
marc
I have to make an pie chart
Can you help?
best regards
marc
draw circle
then draw line
convert % into degree
rotate degrees
draw line
repeat
or search code exchange i think there’s something in there
Hey, thank you for your suport. I will try it.
how can i fill in the color now between this 2 line?
found a code
http://forums.coronalabs.com/topic/2318-graphs-charts-needed/
display.setStatusBar( display.HiddenStatusBar )
local barRadius = 150
local barWidth = 5
local barRotation = 0
local bars = {}
for i=1,359 do
bars[i] = display.newLine(display.contentWidth/2, display.contentHeight/2,
(display.contentWidth/2)-barRadius,display.contentHeight/2 )
bars[i]:setColor( 255, 255, 255 )
bars[i].width = barWidth
bars[i].rotation = barRotation
barRotation = barRotation + 1
end
for i=150,359 do
bars[i]:setColor( 0, 255, 0 )
end
—Close—
hast von mir hahaha ;D *hust* Ivan :p
draw circle
then draw line
convert % into degree
rotate degrees
draw line
repeat
or search code exchange i think there’s something in there
Hey, thank you for your suport. I will try it.
how can i fill in the color now between this 2 line?
found a code
http://forums.coronalabs.com/topic/2318-graphs-charts-needed/
display.setStatusBar( display.HiddenStatusBar )
local barRadius = 150
local barWidth = 5
local barRotation = 0
local bars = {}
for i=1,359 do
bars[i] = display.newLine(display.contentWidth/2, display.contentHeight/2,
(display.contentWidth/2)-barRadius,display.contentHeight/2 )
bars[i]:setColor( 255, 255, 255 )
bars[i].width = barWidth
bars[i].rotation = barRotation
barRotation = barRotation + 1
end
for i=150,359 do
bars[i]:setColor( 0, 255, 0 )
end
—Close—
hast von mir hahaha ;D *hust* Ivan :p
In order to set fill the color using code you may use “bars[i]:setColor( 255, 255, 255 )” or you can also specify the hexadecimal codes for the colors as “bars[i]:setColor(”#ffffff")"
html5 chart
In order to set fill the color using code you may use “bars[i]:setColor( 255, 255, 255 )” or you can also specify the hexadecimal codes for the colors as “bars[i]:setColor(”#ffffff")"
html5 chart