Estou com um problema de vetor no grafico Pie [pizza] da linha 20 a 27
The best overloaded method match for ‘ZedGraph.GraphPane.AddPieSlice(double, System.Drawing.Color, System.Drawing.Color, float, double, string)’ has some invalid arguments
Alguem sabe ?
Argument ‘1’: cannot convert from ‘double[]’ to ‘double’
[code]// PIE
if (Tipos.Pie.ToString().Equals("VALOR DA TELA"))
{
string titulo = "Parametro1";
string[] nomes;
double[] x1;
double[] y2;
double[] y3;
myPane.Title.Text = titulo;
myPane.Title.FontSpec.IsItalic = true;
myPane.Title.FontSpec.Size = 24f;
myPane.Title.FontSpec.Family = "Times New Roman";
for (int i = 0; i < 36; i++)
{
nomes = new string[i];
x1 = new double[i];
PieItem segment1 = myPane.AddPieSlice(x1, Color.Navy, Color.White, 45f, 0, nomes);
PieItem segment3 = myPane.AddPieSlice(x1, Color.Purple, Color.White, 45f, .0, nomes);
PieItem segment4 = myPane.AddPieSlice(x1, Color.LimeGreen, Color.White, 45f, 0, nomes);
PieItem segment2 = myPane.AddPieSlice(x1, Color.SandyBrown, Color.White, 45f, 0.2, nomes);
PieItem segment6 = myPane.AddPieSlice(x1, Color.Red, Color.White, 45f, 0, nomes);
PieItem segment7 = myPane.AddPieSlice(x1, Color.Blue, Color.White, 45f, 0.2, nomes);
PieItem segment8 = myPane.AddPieSlice(x1, Color.Green, Color.White, 45f, 0, nomes);
PieItem segment9 = myPane.AddPieSlice(x1, Color.Yellow, Color.White, 45f, 0.2, nomes);
segment2.LabelDetail.FontSpec.FontColor = Color.Red;
}
// Sum up the pie values
CurveList curves = myPane.CurveList;
double total = 0;
for (int j = 0; j < curves.Count; j++)
total += ((PieItem)curves[j]).Value;
// Make a text label to highlight the total value
TextObj text = new TextObj("Total 2004 Sales\n" + "$" + total.ToString() + "M",
0.18F, 0.40F, CoordType.PaneFraction);
text.Location.AlignH = AlignH.Center;
text.Location.AlignV = AlignV.Bottom;
text.FontSpec.Border.IsVisible = false;
text.FontSpec.Fill = new Fill(Color.White, Color.FromArgb(255, 100, 100), 45F);
text.FontSpec.StringAlignment = StringAlignment.Center;
myPane.GraphObjList.Add(text);
// Create a drop shadow for the total value text item
TextObj text2 = new TextObj(text);
text2.FontSpec.Fill = new Fill(Color.Black);
text2.Location.X += 0.008f;
text2.Location.Y += 0.01f;
myPane.GraphObjList.Add(text2);
zgc.AxisChange();
}//end if [/code]