-
-
- handlePieChange(index, 'innerRadius', parseInt(e.target.value, 10))}
- className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
- />
-
-
-
- handlePieChange(index, 'outerRadius', parseInt(e.target.value, 10))}
- className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
- />
-
-
-
- handlePieChange(index, 'startAngle', parseInt(e.target.value, 10))}
- className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
- />
-
-
-
- handlePieChange(index, 'endAngle', parseInt(e.target.value, 10))}
- className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
- />
-
-
-
- handlePieChange(index, 'paddingAngle', parseInt(e.target.value, 10))}
- className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
- />
-
-
-
- handlePieChange(index, 'cx', e.target.value)}
- className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
- />
-
-
-
- handlePieChange(index, 'cy', e.target.value)}
- className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
- />
-
-
+ {pie.innerRadius !== undefined && (
+
+
+ handlePieChange(index, 'innerRadius', parseInt(e.target.value, 10))}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.outerRadius !== undefined && (
+
+
+ handlePieChange(index, 'outerRadius', parseInt(e.target.value, 10))}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.startAngle !== undefined && (
+
+
+ handlePieChange(index, 'startAngle', parseInt(e.target.value, 10))}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.endAngle !== undefined && (
+
+
+ handlePieChange(index, 'endAngle', parseInt(e.target.value, 10))}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.cx !== undefined && (
+
+
+ handlePieChange(index, 'cx', e.target.value)}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.cy !== undefined && (
+
+
+ handlePieChange(index, 'cy', e.target.value)}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.paddingAngle !== undefined && (
+
+
+ handlePieChange(index, 'paddingAngle', parseInt(e.target.value, 10))}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.showLabels !== undefined && (
+
+ )}
+ {pie.label !== undefined && (
+
+
+ handleLabelChange(index, e.target.value)}
+ className="w-full px-3 py-2 border border-purple-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-300 ease-in-out"
+ />
+
+ )}
+ {pie.activeShape !== undefined && (
+
+ )}