Christian,

I'm trying to do a simple pie chart using ChartDirector.  It looks like I
can do it with the "setColor" method, but I can't seem to get it to
work. First of all, what is a colorvalue "number"?  Finally, how do I
format the data so it is integer instead of double?  I purchased a license
of ChartDirector in 2010 but never got around to using it until now.  Sorry
for being such a noob.

Here's the code I am using (based on the examples in ChartDirector).  Male
and Female are passed in doubles:

  dim p as new picture(g.width, 200, 32)
  dim c as CDPieChartMBS

  // The data for the pie chart
  dim data(-1) as double=array(male, female)

  // The labels for the pie chart
  dim labels(-1) as string=array("Male", "Female")

  // Create a PieChart object
  c = new CDPieChartMBS(p.width, p.height)

  // Set the center of the pie and its radius to 60 pixels
  c.setPieSize(p.width/2, p.height/2, 60)

  // Antialias
  c.setAntiAlias true, 1

  // Set color of pies (HOW DO YOU DO THIS PART)
  c.setColor(<what do i put here>, <what do i put here>)  // Male
  c.setColor(<what do i put here>, <what do i put here>)  // Female

  // Set the pie data and the pie labels
  c.setData(data,labels)

  p = c.MakeChartPicture

  return p
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to