protected override void SolveInstance(IGH_DataAccess DA) { string title = ""; List <double> values = new List <double>(); List <string> names = new List <string>(); string textFormat = ""; List <Color> colors = new List <Color>(); DA.GetData(0, ref title); DA.GetDataList(1, values); DA.GetDataList(2, names); DA.GetData(3, ref textFormat); DA.GetDataList(4, colors); BarChart chartObject = new BarChart(); dialogImage = chartObject; PterodactylGrasshopperBitmapGoo GH_bmp = new PterodactylGrasshopperBitmapGoo(); chartObject.BarChartData(true, title, values, names, textFormat, colors, GH_bmp.ReferenceTag); using (Bitmap b = chartObject.ExportBitmap()) { GH_bmp.Value = b.Clone(new Rectangle(0, 0, b.Width, b.Height), b.PixelFormat); GH_bmp.ReportPart = chartObject.Create(); DA.SetData(0, GH_bmp); } }