
Ideally, a pie chart isn’t the best option for those dealing with multiple columns. Make a chart with data spread across multiple columns in Excel The chart will appear similar to the pie chart of your Excel sheet, but the values would probably be mentioned inside the pies. Click on Insert > Other Charts > Hierarchical > Sunburst.Ī larger view of the hierarchical sunburst chart is as follows:.Select the data across the 2 columns in question.


Position = ExcelDataLabelPosition.BestFitĭim stream As Stream = File.Create("Output.While you are provided with a lot of options for creating charts in Excel, every chart has a different scope and different use. 'Open existing workbook with data enteredĭim assembly As Assembly = GetType(Program).GetTypeInfo().Assemblyĭim fileStream As Stream = assembly.GetManifestResourceStream("")ĭim workbook As IWorkbook = (fileStream)ĭim worksheet As IWorksheet = workbook.Worksheets(0)ĭim chart As IChartShape = ()Ĭ = ExcelLegendPosition.Bottom Using excelEngine As ExcelEngine = New ExcelEngine()ĭim application As IApplication = excelEngine.ExcelĪpplication.DefaultVersion = ExcelVersion.Excel2016 Public Shared Sub Main(ByVal args As String()) Stream stream = File.Create("Output.xlsx") IWorksheet worksheet = workbook.Worksheets Stream fileStream = assembly.GetManifestResourceStream("") Open existing workbook with data enteredĪssembly assembly = typeof(Program).GetTypeInfo().Assembly IApplication application = excelEngine.Excel Īpplication.DefaultVersion = ExcelVersion.Excel2016 Using (ExcelEngine excelEngine = new ExcelEngine()) The following C#/ VB.NET complete code snippet shows the creation of pie chart using XlsIO.

To know more about creating charts with various settings using XlsIO, please refer the documentation. NOTE: Applying properties apart from the mentioned list might throw exception or the changes will not be reflected in the output document because those properties are not related to pie chart. IsVar圜olor (All slices will be represented with same color if IsVar圜olor is FALSE) Position = ExcelDataLabelPosition.BestFit īelow is the list of other properties that is applicable for a pie chart.ģ.
