Class RevealUtility

Utility class used to load a dashboard object or to get the list of values for a given filter.

Inheritance
System.Object
RevealUtility
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Reveal.Sdk
Assembly: Reveal.UI.Sdk.dll
Syntax
[Obsolete("Please create Dashboards using the `new Dashboard(argument)` or `Dashboard.LoadDasboardAsync(argument)` methods")]
public class RevealUtility

Constructors

RevealUtility()

Declaration
public RevealUtility()

Methods

GetFilterValues(RVDashboard, RVDashboardFilter, CancellationToken)

Method used to get the possible values for a given filter. For a Country filter, this will return the list of all countries, not only the selected ones. You can use this method to create your own UI to select filter values.

Declaration
public static Task<IEnumerable<RVFilterValue>> GetFilterValues(RVDashboard dashboard, RVDashboardFilter filter, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
RVDashboard dashboard

The dashboard object obtained with LoadDashboard(Stream) or LoadDashboardSync(Stream)

RVDashboardFilter filter

The filter to return the values for, a member of the collection Filters, might be obtained also using GetByTitle or GetById in Filters

System.Threading.CancellationToken cancellationToken

Optional parameter that can be used to cancel the async operation

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<RVFilterValue>>

The list of values for the given filter

See Also

LoadDashboard(Stream)

Loads a dashboard from the specified stream, asynchronous method that returns the loaded dashboard.

Declaration
public static Task<RVDashboard> LoadDashboard(Stream data)
Parameters
Type Name Description
System.IO.Stream data

The stream with rdash file format

Returns
Type Description
System.Threading.Tasks.Task<RVDashboard>

The dashboard object

Examples
             public partial class MainWindow : Window
             {
                 public MainWindow()
                 {
                     InitializeComponent();
                     this.Loaded += MainWindow_Loaded;
                 }

                 private async void MainWindow_Loaded(object sender, RoutedEventArgs e)
                 {
                     var path = @"..\..\Sales.rdash";

                     var revealView = new RevealView();
                     using (var fileStream = File.OpenRead(path))
                     {
                         var dashboard = await RevealUtility.LoadDashboard(fileStream);
                         var settings = new RevealSettings(dashboard);
                         revealView.Settings = settings;
                     }

                     Grid grid = this.Content as Grid;
                     grid.Children.Add(revealView);
                 }
             }

LoadDashboardSync(Stream)

Loads a dashboard from the specified stream, synchronous method that returns the loaded dashboard.

Declaration
public static RVDashboard LoadDashboardSync(Stream data)
Parameters
Type Name Description
System.IO.Stream data

The stream with rdash file format

Returns
Type Description
RVDashboard

The dashboard object