public Chart(Schema.Specification vegaLiteSpecification, Guid?id = null) : this(id) { Specification = vegaLiteSpecification; if (string.IsNullOrEmpty(Specification.Data?.Name) && string.IsNullOrEmpty(Specification.Spec?.DataSource?.Name)) { if (Specification.Data == null) { Specification.Data = new Schema.DataSource(); } Specification.Data.Name = $"dataset_{Id.ToString().Replace("-", "")}"; } if (Specification.Config == null) { Specification.Config = new Schema.Config() { Legend = new Schema.LegendConfig() { Orient = Schema.LegendOrient.Top } }; } }
public Chart(string title, Schema.Specification vegaLiteSpecification, Guid?id = null) : this(vegaLiteSpecification, id) { Title = title; }
public Chart(Schema.Specification vegaLiteSpecification, string datasetName, Guid?id = null) : this(vegaLiteSpecification, id) { Specification.Data.Name = datasetName; }
public Chart(Schema.Specification vegaLiteSpecification, int width, int height, Guid?id = null) : this(vegaLiteSpecification, id) { Title = vegaLiteSpecification.Description; Width = width; Height = height; }
public Chart(string title, Schema.Specification vegaLiteSpecification, int width, int height, Guid?id = null) : this(vegaLiteSpecification, id) { Title = title; Width = width; Height = height; }