public SampleChartJsProgram(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter, IDefaultChartGenerator defaultChartGenerator) { this.randomColorGenerator = randomColorGenerator; this.chartValidator = chartValidator; this.jsTemplateWriter = jsTemplateWriter; this.defaultChartGenerator = defaultChartGenerator; }
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>() }; }
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; }
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; }
protected ChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter) { this.defaultChartGenerator = defaultChartGenerator; this.chartValidator = chartValidator; this.jsTemplateWriter = jsTemplateWriter; }
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; }
public BubbleChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IJSTemplateWriter jsTemplateWriter, Data <BubbleDataset> data) : base(defaultChartGenerator, chartValidator, jsTemplateWriter) { chart = defaultChartGenerator.GenerateBubbleChart(); chart.Data = data; }