Hey, @RagdogStudios, I’ve incorporated your pie chart in my project and came to a problem on iPad (both 1st gen and 3rd gen iPad).
The pie charts simply go wild and, in some cases, crash my app.
On simulator, the very same pie charts work perfectly fine. So far, these pie charts have not failed me on my iPod Touch 5.
So I went ahead and created a simple project with the following, and the pie chart looks quite strange on iPad 1G, iPad 3G and iPod Touch 5:
[lua]
– build.settings
settings =
{
orientation =
{
default = “landscapeRight”,
supported =
{
“landscapeRight”,“landscapeLeft”,
},
},
}
– config.lua
application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
xAlign = “center”, – center is the default, so if center is desirable, this line can be removed
yAlign = “center”, – center is the default, so if center is desirable, this line can be removed
antialias = true,
imageSuffix =
{
["@2x"] = 1.6,
["@4x"] = 3.6,
},
},
}
– main.lua
display.setStatusBar( display.HiddenStatusBar )
local ragdogLib = require( “ragdogLib” )
local widget = require( “widget” )
local percent = {}
for i=1,6 do
percent[i] = 100/6
end
local data = {
radius = 90,
values = {
{percentage = percent[1], color = {0, 0, 1}},
{percentage = percent[2], color = {.5, 0, 0}},
{percentage = percent[3], color = {0, 1, 0}},
{percentage = percent[4], color = {1, 1, 0}},
{percentage = percent[5], color = {1, 0, 1}},
{percentage = percent[6], color = {0.5, 0, 1}},
}
};
local pie = ragdogLib.createPieChart(data);
pie.x, pie.y = display.contentCenterX, display.contentCenterY;
[/lua]
Any idea why this might be?
Naomi