public void createChartWeekly(WinChartViewer viewer, DataTable errorData, int per) { try { Chart.setLicenseCode("DEVP-2LSU-B4LX-YCTY-2DF2-77EE"); double[] data = null; int[] color = null; string[] labels = null; // this.chartWidth = this.Width; //plottWidth = 900; GetDataForChart(errorData, ref labels, ref data, ref color); PieChart c = new PieChart(viewer.Width, viewer.Height); c.setBorder(10); c.addTitle(" BY TYPE", "Calibri Bold", 30 ).setBackground(Chart.metalColor(0xff9999)); c.setPieSize(450, viewer.Height / 2, 150); c.set3D(40); c.setLabelLayout(Chart.SideLayout); ChartDirector.TextBox t = c.setLabelStyle("Arial Bold", 10, Chart.CColor(Color.Blue)); t.setBackground(Chart.SameAsMainColor, Chart.Transparent, Chart.glassEffect()); t.setText("{label} ({value})"); t.setRoundedCorners(4); c.setLineColor(Chart.SameAsMainColor); c.setStartAngle(15); c.setData(data, labels); viewer.Chart = c; viewer.ImageMap = c.getHTMLImageMap("clickable", "", "title='{label}'"); } catch (Exception) { } }