Chart Label
Value Assign
Template
template.docx (29.0 KB)
May I know is any method to display the label differently with the value assign in the table?
Example
Let say A object, the background color value is 50 and how can I display the label 8?
Please advise how can I display it, or any other approach to use.
public class Data {
public List<PieChartList> pieChartList {get;set;}
}
public class PieChartList{
public string Name {get;set;}
public int Value {get;set;}
}
List<PieChartList> pieChartList = new List<PieChartList>
{
// First PieChartList (original scores)
new PieChartList
{
A = new Pies { Name = "A", Value = 50 },
B = new Pies { Name = "B", Value = 30 },
C = new Pies { Name = "C", Value = 40 },
D = new Pies { Name = "D", Value = 80 },
},
// Second PieChartList (inverse scores)
new PieChartList
{
A = new Pies { Name = "A", Value = 50 },
B = new Pies { Name = "B", Value = 70 },
C = new Pies { Name = "C", Value = 60 },
D = new Pies { Name = "D", Value = 20 },
},
// Third PieChartList (zero-filled)
new PieChartList
{
A = new Pies { Name = "A", Value = 0 },
B = new Pies { Name = "B", Value = 0 },
C = new Pies { Name = "C", Value = 0 },
D = new Pies { Name = "D", Value = 0 },
},
// Fourth PieChartList (zero-filled)
new PieChartList
{
A = new Pies { Name = "A", Value = 0 },
B = new Pies { Name = "B", Value = 0 },
C = new Pies { Name = "C", Value = 0 },
D = new Pies { Name = "D", Value = 0 },
}
};
Data data = new Data();
data.pieChartList = pieChartList;
var documentPath = "template.docx";
Document document = new Document(documentPath);
ReportingEngine engine = new ReportingEngine();
engine.Options = ReportBuildOptions.AllowMissingMembers;
engine.BuildReport(document, data);
document.Save("output.pdf");