Skip to content

Commit

Permalink
removed builders - need to rethink
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlagunas committed May 3, 2024
1 parent c096f5f commit 335777a
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 324 deletions.
47 changes: 3 additions & 44 deletions e2e/Sandbox/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
using Reveal.Sdk;
using Reveal.Sdk.Data;
using Reveal.Sdk.Data.Json;
using Reveal.Sdk.Data.Microsoft.SqlServer;
using Reveal.Sdk.Data.Rest;
using Reveal.Sdk.Dom;
using Reveal.Sdk.Dom.Data;
using Reveal.Sdk.Dom.Visualizations;
using Sandbox.Factories;
using Sandbox.Helpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Documents;

namespace Sandbox
{
Expand Down Expand Up @@ -125,54 +126,12 @@ private async void Create_Dashboard(object sender, RoutedEventArgs e)

//document.Save(_saveRdashToPath);

//var dsi = new RestBuilder("Excel Data Source", "Marketing Sheet")
// .SetUrl("https://excel2json.io/api/share/6e0f06b3-72d3-4fec-7984-08da43f56bb9")
// .SetFields(
// new TextField("CategoryName"),
// new TextField("ProductName"),
// new NumberField("ProductSales")
// ).Build();

//var dsi = Reveal.Sdk.Dom.Data.DataSourceFactory.Create(DataSourceType.REST, "Excel Data Source", "Marketing Sheet")
// .SetFields(new List<IField>
// {
// new TextField("CategoryName"),
// new TextField("ProductName"),
// new NumberField("ProductSales")
// }).Build();

var dsi = new RemoteFileBuilder("Excel Data Source", "Marketing Sheet")
.SetUrl("http://dl.infragistics.com/reportplus/reveal/samples/Samples.xlsx")
.UseExcel("Marketing")
.SetFields(new List<IField>
{
new DateField("Date"),
new NumberField("Spend"),
new NumberField("Budget"),
new NumberField("CTR"),
new NumberField("Avg. CPC"),
new NumberField("Traffic"),
new NumberField("Paid Traffic"),
new NumberField("Other Traffic"),
new NumberField("Conversions"),
new TextField("Territory"),
new TextField("CampaignID"),
new NumberField("New Seats"),
new NumberField("Paid %"),
new NumberField("Organic %")
}).Build();


var document = new RdashDocument()
{
Title = "My Dashboard",
Description = "I created"
};

//var gridViz = new GridVisualization(dsi).SetColumns("CategoryName", "ProductName", "ProductSales");
var gridViz = new GridVisualization(dsi).SetColumns("Spend", "Budget", "CTR");
document.Visualizations.Add(gridViz);

var json = document.ToJsonString();
//json.Save(_saveJsonToPath);
_revealView.Dashboard = await RVDashboard.LoadFromJsonAsync(json);
Expand Down
61 changes: 0 additions & 61 deletions src/Reveal.Sdk.Dom/Data/Builders/DataSourceBuilder.cs

This file was deleted.

15 changes: 0 additions & 15 deletions src/Reveal.Sdk.Dom/Data/Builders/Interfaces/IDataSourceBuilder.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Reveal.Sdk.Dom/Data/Builders/Interfaces/IRestBuilder.cs

This file was deleted.

68 changes: 0 additions & 68 deletions src/Reveal.Sdk.Dom/Data/Builders/RemoteFileBuilder.cs

This file was deleted.

107 changes: 0 additions & 107 deletions src/Reveal.Sdk.Dom/Data/Builders/RestBuilder.cs

This file was deleted.

18 changes: 0 additions & 18 deletions src/Reveal.Sdk.Dom/Data/DataSourceFactory.cs

This file was deleted.

0 comments on commit 335777a

Please sign in to comment.