Пример #1
0
 public SampleChartJsProgram(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter, IDefaultChartGenerator defaultChartGenerator)
 {
     this.randomColorGenerator  = randomColorGenerator;
     this.chartValidator        = chartValidator;
     this.jsTemplateWriter      = jsTemplateWriter;
     this.defaultChartGenerator = defaultChartGenerator;
 }
Пример #2
0
        protected DataBuilder(IRandomColorGenerator randomColorGenerator)
        {
            this.randomColorGenerator = randomColorGenerator;

            randomColorGenerator  = new RandomColorGenerator();
            chartValidator        = new ChartValidator();
            jsTemplateWriter      = new JSTemplateWriter();
            defaultChartGenerator = new DefaultChartGenerator();
            data = new Data <TDataset>
            {
                Datasets = new List <TDataset>()
            };
        }
Пример #3
0
 public HorizontalBarChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter, Data <BarDataset> data) : base(defaultChartGenerator, chartValidator, jsTemplateWriter, data)
 {
     chart        = defaultChartGenerator.GenerateHorizontalBarChart();
     chartOptions = (BarChartOptions)chart.Options;
     chart.Data   = data;
 }
Пример #4
0
 public DoughnutChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter, Data <DoughnutDataset> data) : base(defaultChartGenerator, chartValidator, jsTemplateWriter)
 {
     chart        = defaultChartGenerator.GenerateDoughnutChart();
     chartOptions = (DoughnutChartOptions)chart.Options;
     chart.Data   = data;
 }
Пример #5
0
 protected ChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter)
 {
     this.defaultChartGenerator = defaultChartGenerator;
     this.chartValidator        = chartValidator;
     this.jsTemplateWriter      = jsTemplateWriter;
 }
Пример #6
0
 public RadarChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter, Data <RadarDataset> data) : base(defaultChartGenerator, chartValidator, jsTemplateWriter)
 {
     chart      = defaultChartGenerator.GenerateRadarChart();
     radarScale = (RadarOptionsScale)chart.Options.Scales;
     chart.Data = data;
 }
Пример #7
0
 public BubbleChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter, Data <BubbleDataset> data) : base(defaultChartGenerator, chartValidator, jsTemplateWriter)
 {
     chart      = defaultChartGenerator.GenerateBubbleChart();
     chart.Data = data;
 }