task 1 complete task2 task2 change test data initialization task3 task2 fix fixes add percents minor fixes
30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
using ComponentLibrary1.office_package.HelperEnums;
|
|
using ComponentLibrary1.office_package.HelperModels;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ComponentLibrary1.pdf_diagram
|
|
{
|
|
public class PdfDiagramInfo : IPdfInfo, IPdfPieChartParameters
|
|
{
|
|
public string FileName { get; set; } = string.Empty;
|
|
public string Title { get; set; } = string.Empty;
|
|
public string ChartTitle { get; set; } = string.Empty;
|
|
public PdfDiagramLegendLocation LegendLocation { get; set; } = PdfDiagramLegendLocation.Right;
|
|
public PdfDiagramSeries Series { get; set; } = new();
|
|
|
|
public void CheckFields()
|
|
{
|
|
if (string.IsNullOrEmpty(FileName))
|
|
throw new ArgumentNullException(nameof(FileName), "File path and name cannot be null or empty.");
|
|
if (string.IsNullOrEmpty(Title))
|
|
throw new ArgumentNullException(nameof(Title), "Title cannot be null or empty.");
|
|
if (Series == null)
|
|
throw new ArgumentNullException(nameof(Series), "Series cannot be null or empty.");
|
|
}
|
|
}
|
|
}
|