Skip to content

Commit

Permalink
Mininmal changes to support CategoryVisualizationDataspec as an assig…
Browse files Browse the repository at this point in the history
…nable spec for girds
  • Loading branch information
srodriguezinfragistics committed Sep 25, 2024
1 parent fae5984 commit 8f1ebec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Reveal.Sdk.Dom/Data/Enums/DataSourceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,8 @@ public enum DataSourceProvider

[EnumMember(Value = "WEBSERVICE")]
WebService,

[EnumMember(Value = "GOOGLE_ADS")]
GoogleAds,
}
}
13 changes: 11 additions & 2 deletions src/Reveal.Sdk.Dom/Visualizations/GridVisualization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<TabularColumn> Columns { get { return VisualizationDataSpec.Columns; } }
public List<TabularColumn> Columns { get {
if (VisualizationDataSpec is GridVisualizationDataSpec gds)
{
return gds.Columns;
}
else
{
return new List<TabularColumn>();
}
} }

[JsonProperty(Order = 7)]
GridVisualizationDataSpec VisualizationDataSpec { get; set; } = new GridVisualizationDataSpec();
VisualizationDataSpec VisualizationDataSpec { get; set; } = new GridVisualizationDataSpec();
}
}

0 comments on commit 8f1ebec

Please sign in to comment.