Class WidgetGoalTrends
Represents the WidgetGoalTrends class which extends the Widget class.
Inherited Members
Namespace: DataWeb.Dashboard.Widgets
Assembly: DataWeb.Core.dll
Syntax
public class WidgetGoalTrends : WidgetTrends
Constructors
WidgetGoalTrends(IServiceProvider)
Represents the WidgetGoalTrends class which extends the Widget class.
Declaration
public WidgetGoalTrends(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider |
Methods
GetDataAsync(Panel, Dictionary<string, object>, IUser, CancellationToken)
Gets the data for the widget.
Declaration
public override Task<WidgetContentData> GetDataAsync(Panel panel, Dictionary<string, object> widgetSettings, IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The Panel 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<WidgetContentData> | The widget data. |
Overrides
GetGoalData(WidgetPeriodData, string, string, string, string, string, CancellationToken)
Asynchronously retrieves goal data for a given period.
Declaration
public virtual Task<WidgetGoalTrends.GoalData> GetGoalData(WidgetTrends.WidgetPeriodData periodData, string chartType = "Bar", string goalName = null, string goalCategory = null, string goalReferenceId = null, string goalColor = "Blue", CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
WidgetTrends.WidgetPeriodData | periodData | The widget period data to base the goal data on. |
string | chartType | The type of chart to display (e.g., "Bar"). |
string | goalName | The name of the goal to retrieve data for. |
string | goalCategory | The category of the goal to retrieve data for. |
string | goalReferenceId | The reference Id of the goal to retrieve data for. |
string | goalColor | The color of the goal data in the chart. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<WidgetGoalTrends.GoalData> | The goal data. |