DataWeb
Search Results for

    Show / Hide Table of Contents

    Class WidgetTrends

    Represents the WidgetTrends class which extends the DashboardWidget class.

    Inheritance
    object
    DashboardWidget
    WidgetTrends
    WidgetGoalTrends
    Inherited Members
    DashboardWidget.serviceProvider
    DashboardWidget.IdMaster
    DashboardWidget.Name
    DashboardWidget.Title
    DashboardWidget.Type
    DashboardWidget.Settings
    DashboardWidget.WidgetComponent
    DashboardWidget.WidgetClass
    DashboardWidget.VisibleRoles
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Dashboard.Widgets
    Assembly: DataWeb.Core.dll
    Syntax
    public class WidgetTrends : DashboardWidget

    Constructors

    WidgetTrends(IServiceProvider)

    Represents the WidgetTrends class which extends the DashboardWidget class.

    Declaration
    public WidgetTrends(IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IServiceProvider serviceProvider

    Methods

    GetDataAsync(DashboardPanel, Dictionary<string, object>, IUser, CancellationToken)

    Gets the data for the widget.

    Declaration
    public override Task<DashboardWidgetContentData> GetDataAsync(DashboardPanel panel, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    DashboardPanel panel

    The DashboardPanel that the widget belongs to.

    Dictionary<string, object> widgetSettings

    The widget settings.

    IUser user

    The IUser who is viewing the widget.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<DashboardWidgetContentData>

    The widget data.

    Overrides
    DashboardWidget.GetDataAsync(DashboardPanel, Dictionary<string, object>, IUser, CancellationToken)

    GetDefaultSettingsAsync(DashboardPanel, IUser, CancellationToken)

    Gets the default settings for the widget.

    Declaration
    public override Task<Dictionary<string, object>> GetDefaultSettingsAsync(DashboardPanel panel, IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    DashboardPanel panel

    The DashboardPanel that the widget belongs to.

    IUser user

    The IUser who is viewing the widget.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<Dictionary<string, object>>

    A dictionary of default settings.

    Overrides
    DashboardWidget.GetDefaultSettingsAsync(DashboardPanel, IUser, CancellationToken)

    GetOptionsAsync(DashboardPanel, Dictionary<string, object>, IUser, CancellationToken)

    Gets the options for the widget.

    Declaration
    public override Task<DashboardWidgetOptions> GetOptionsAsync(DashboardPanel panel, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    DashboardPanel panel

    The DashboardPanel that the widget belongs to.

    Dictionary<string, object> widgetSettings

    The widget settings.

    IUser user

    The IUser who is viewing the widget.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<DashboardWidgetOptions>

    The widget options.

    Overrides
    DashboardWidget.GetOptionsAsync(DashboardPanel, Dictionary<string, object>, IUser, CancellationToken)

    GetPeriodData(string, DateTime?, DateTime?)

    Gets the period data for a given period mode and optional start and end dates.

    Declaration
    public virtual PeriodData GetPeriodData(string periodMode, DateTime? periodDateStart = null, DateTime? periodDateEnd = null)
    Parameters
    Type Name Description
    string periodMode

    The period mode as a string (e.g. "Today", "CurrentWeek", "CurrentMonth", etc.).

    DateTime? periodDateStart

    Optional start date for custom period mode.

    DateTime? periodDateEnd

    Optional end date for custom period mode.

    Returns
    Type Description
    PeriodData

    A WidgetPeriodData object containing the period data, including start and end dates, aggregation mode, and description.

    GetPeriodModes()

    Gets a list of period modes for selection in the user interface.

    Declaration
    public virtual List<List.ListItem> GetPeriodModes()
    Returns
    Type Description
    List<List.ListItem>

    A list of List.ListItem objects representing the available period modes.

    UpdateSettingsAsync(DashboardPanel, Dictionary<string, object>, Dictionary<string, object>, IUser, CancellationToken)

    Updates the widget settings.

    Declaration
    public override Task UpdateSettingsAsync(DashboardPanel panel, Dictionary<string, object> providedSettings, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    DashboardPanel panel

    The DashboardPanel that the widget belongs to.

    Dictionary<string, object> providedSettings

    The provided settings.

    Dictionary<string, object> widgetSettings

    The widget settings.

    IUser user

    The IUser who is viewing the widget.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    Overrides
    DashboardWidget.UpdateSettingsAsync(DashboardPanel, Dictionary<string, object>, Dictionary<string, object>, IUser, CancellationToken)

    ValidateSettingsAsync(DashboardPanel, Dictionary<string, object>, Dictionary<string, object>, IUser, CancellationToken)

    Validates the widget settings.

    Declaration
    public override Task<List<ValidationError>> ValidateSettingsAsync(DashboardPanel panel, Dictionary<string, object> providedSettings, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    DashboardPanel panel

    The DashboardPanel that the widget belongs to.

    Dictionary<string, object> providedSettings

    The provided settings.

    Dictionary<string, object> widgetSettings

    The widget settings.

    IUser user

    The IUser who is viewing the widget.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<List<ValidationError>>

    The list of validation errors.

    Overrides
    DashboardWidget.ValidateSettingsAsync(DashboardPanel, Dictionary<string, object>, Dictionary<string, object>, IUser, CancellationToken)

    Extension Methods

    DashboardMapperExtension.ToDashboardWidgetInfo(DashboardWidget)
    In this article
    Back to top Generated by DocFX