Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
Improve Pie Charts (It's no longer possible to use multiple values for a single ChartPie, as it didn't really make sense)
This no longer works:
List<string> categories = new List<string>() { "Food", "Housing", "Mix" };
var pieChart = document.AddPieChart();
pieChart.AddCategories(categories);
pieChart.AddChartPie("Poland", new List<int> { 15, 20, 30 });
Instead, you need to use a more generic approach. There's AddChart() method, which then depending on what you want to add works with AddPie, AddLine, AddArea,AddBar methods. The methods do not mix together.
var pieChart2 = document.AddChart("Test");
pieChart2.AddPie("Poland", 15);
pieChart2.AddPie("USA", 30);
pieChart2.AddPie("Brazil", 20.2);
// or using
document.AddChart("Test")
.AddPie("Poland", 15)
.AddPie("USA", 30)
.AddPie("Brazil", 20.2);
This PR tries to deliver a few things:
This no longer works:
Instead, you need to use a more generic approach. There's
AddChart()
method, which then depending on what you want to add works withAddPie
,AddLine
,AddArea
,AddBar
methods. The methods do not mix together.