diff --git a/src/Reveal.Sdk.Dom/Data/Enums/DataSourceProvider.cs b/src/Reveal.Sdk.Dom/Data/Enums/DataSourceProvider.cs index a1c468b0..cad78b12 100644 --- a/src/Reveal.Sdk.Dom/Data/Enums/DataSourceProvider.cs +++ b/src/Reveal.Sdk.Dom/Data/Enums/DataSourceProvider.cs @@ -25,6 +25,9 @@ public enum DataSourceProvider [EnumMember(Value = "DROPBOXPROVIDER")] Dropbox, + [EnumMember(Value = "GOOGLE_ADS")] + GoogleAds, + [EnumMember(Value = "GOOGLE_ANALYTICS")] GoogleAnalytics, diff --git a/src/Reveal.Sdk.Dom/Visualizations/GridVisualization.cs b/src/Reveal.Sdk.Dom/Visualizations/GridVisualization.cs index b1b7a1b7..eacb0e89 100644 --- a/src/Reveal.Sdk.Dom/Visualizations/GridVisualization.cs +++ b/src/Reveal.Sdk.Dom/Visualizations/GridVisualization.cs @@ -27,9 +27,18 @@ public GridVisualization(DataSourceItem dataSourceItem) : this(null, dataSourceI public GridVisualization(string title, DataSourceItem dataSourceItem) : base(title, dataSourceItem) { ChartType = ChartType.Grid; } [JsonIgnore] - public List Columns { get { return VisualizationDataSpec.Columns; } } + public List Columns { get { + if (VisualizationDataSpec is GridVisualizationDataSpec gds) + { + return gds.Columns; + } + else + { + return new List(); + } + } } [JsonProperty(Order = 7)] - GridVisualizationDataSpec VisualizationDataSpec { get; set; } = new GridVisualizationDataSpec(); + VisualizationDataSpec VisualizationDataSpec { get; set; } = new GridVisualizationDataSpec(); } }