/// <summary> /// ChartJsBuilder constructor /// </summary> /// <param name="chartVariableName">The name of the Javascript variable that has the HTML <canvas> element where the chart will be used. </param> public ChartJsBuilder(string chartVariableName) { randomColorGenerator = new RandomColorGenerator(); chartValidator = new ChartValidator(); chartJsonHelper = new ChartJsonHelper(chartVariableName); defaultChartGenerator = new DefaultChartGenerator(); }
public LineDataStepsBuilder(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, IDefaultChartGenerator defaultChartGenerator) { this.randomColorGenerator = randomColorGenerator; this.chartValidator = chartValidator; this.chartJsonHelper = chartJsonHelper; this.defaultChartGenerator = defaultChartGenerator; }
public BarDataStepsBuilder(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, IDefaultChartGenerator defaultChartGenerator, bool isHorizontal = false) { this.randomColorGenerator = randomColorGenerator; this.chartValidator = chartValidator; this.chartJsonHelper = chartJsonHelper; this.defaultChartGenerator = defaultChartGenerator; this.isHorizontal = isHorizontal; }
public DoughnutDataStepsBuilder(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, IDefaultChartGenerator defaultChartGenerator, bool isPie = false) { this.randomColorGenerator = randomColorGenerator; this.chartValidator = chartValidator; this.chartJsonHelper = chartJsonHelper; this.defaultChartGenerator = defaultChartGenerator; this.isPie = isPie; }
public LineDataBuilder(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, IDefaultChartGenerator defaultChartGenerator) { this.randomColorGenerator = randomColorGenerator; this.chartValidator = chartValidator; this.chartJsonHelper = chartJsonHelper; this.defaultChartGenerator = defaultChartGenerator; data = new Data <LineDataset> { Datasets = new List <LineDataset>() }; }
public BarDataBuilder(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, IDefaultChartGenerator defaultChartGenerator, bool isHorizontal = false) { this.randomColorGenerator = randomColorGenerator; this.chartValidator = chartValidator; this.chartJsonHelper = chartJsonHelper; this.defaultChartGenerator = defaultChartGenerator; this.isHorizontal = isHorizontal; data = new Data <BarDataset> { Datasets = new List <BarDataset>() }; }
public DoughnutDataBuilder(IRandomColorGenerator randomColorGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, IDefaultChartGenerator defaultChartGenerator, bool isPie = false) { this.randomColorGenerator = randomColorGenerator; this.chartValidator = chartValidator; this.chartJsonHelper = chartJsonHelper; this.defaultChartGenerator = defaultChartGenerator; this.isPie = isPie; data = new Data <DoughnutDataset> { Datasets = new List <DoughnutDataset>() }; }
public BubbleChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, Data <BubbleDataset> data) : base(defaultChartGenerator, chartValidator, chartJsonHelper) { base.Chart = defaultChartGenerator.GenerateBubbleChart(); base.Chart.Data = data; }
public HorizontalBarChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, Data <BarDataset> data) : base(defaultChartGenerator, chartValidator, chartJsonHelper, data) { Chart = defaultChartGenerator.GenerateHorizontalBarChart(); ChartOptions = (BarChartOptions)Chart.Options; Chart.Data = data; }
public RadarChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, Data <RadarDataset> data) : base(defaultChartGenerator, chartValidator, chartJsonHelper) { Chart = defaultChartGenerator.GenerateRadarChart(); radarScale = (RadarOptionsScale)Chart.Options.Scales; Chart.Data = data; }
public PieChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, Data <DoughnutDataset> data) : base(defaultChartGenerator, chartValidator, chartJsonHelper, data) { Chart = defaultChartGenerator.GeneratePieChart(); Chart.Data = data; ChartOptions = (DoughnutChartOptions)base.Chart.Options; }
public BarChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper, Data <BarDataset> data) : base(defaultChartGenerator, chartValidator, chartJsonHelper) { base.Chart = defaultChartGenerator.GenerateBarChart(); base.Chart.Data = data; ChartOptions = (BarChartOptions)Chart.Options; }
protected ChartBuilder(IDefaultChartGenerator defaultChartGenerator, IChartValidator chartValidator, IChartJsonHelper chartJsonHelper) { this.defaultChartGenerator = defaultChartGenerator; this.chartValidator = chartValidator; this.chartJsonHelper = chartJsonHelper; }