36 lines
857 B
C#
36 lines
857 B
C#
using NotVisualComponent.Helpers;
|
|
using NotVisualComponent.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace NotVisualComponent
|
|
{
|
|
public partial class ExcelDiagram : Component
|
|
{
|
|
public ExcelDiagram()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public ExcelDiagram(IContainer container)
|
|
{
|
|
container.Add(this);
|
|
|
|
InitializeComponent();
|
|
}
|
|
public void CreateDoc(ChartConfig config)
|
|
{
|
|
config.CheckFields();
|
|
IContext creator = new WorkWithExcel();
|
|
creator.CreateHeader(config.Header);
|
|
creator.CreateBarChart(config);
|
|
creator.SaveDoc(config.FilePath);
|
|
}
|
|
}
|
|
}
|