# DashboardGenerationOptions Class

> DashboardGenerationOptions class in the TX Sheet Control .NET API: Deterministic generation controls. Covers 1 constructor and 8 properties and a C# example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > DashboardGenerationOptions Class
- **1468 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/llms-full.txt

---

Deterministic generation controls. Regeneration requires TargetId and explicit merge or replace Strategy.

### Syntax

```csharp
public class DashboardGenerationOptions
```

### Members

#### Constructors

| Constructor | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/constructor/llms-full.txt) |  |

#### Properties

| Property | Description |
|---|---|
| [FieldRoles](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/fieldroles-property/llms-full.txt) | FieldRoles value; validation is applied by the owning workbook operation. |
| [MaxWidgets](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/maxwidgets-property/llms-full.txt) | MaxWidgets value; validation is applied by the owning workbook operation. |
| [Name](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/name-property/llms-full.txt) | Name value; validation is applied by the owning workbook operation. |
| [Scope](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/scope-property/llms-full.txt) | Scope value; validation is applied by the owning workbook operation. |
| [Selection](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/selection-property/llms-full.txt) | Selection value; validation is applied by the owning workbook operation. |
| [SourceIds](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/sourceids-property/llms-full.txt) | SourceIds value; validation is applied by the owning workbook operation. |
| [Strategy](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/strategy-property/llms-full.txt) | Strategy value; validation is applied by the owning workbook operation. |
| [TargetId](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/targetid-property/llms-full.txt) | TargetId value; validation is applied by the owning workbook operation. |

### Examples

Apply DashboardGenerationOptions to a small working document, then return the exported bytes. The caller can save or download the result.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateDashboardGenerationOptionsReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Range("A1:B5").SetValuesAsync(new object?[][]
    {
        ["Region", "Revenue"], ["North", 42000], ["South", 38500], ["East", 31200], ["West", 44900]
    });

    await book.Analytics.SetSourceAsync(new AnalyticsSource { Id = "sales", Name = "Regional sales", SheetId = sheet.Id, Range = "A1:B5", HasHeaderRow = true });

    var dashboard = await book.Dashboards.AddAsync("Sales overview");
    await dashboard.AddWidgetAsync(new DashboardWidget { Id = "revenue", Type = "bar", Title = "Revenue by region", Placement = new DashboardPlacement { X = 0, Y = 0, Width = 6, Height = 4 }, Query = new AnalyticsQuery { SourceId = "sales", Dimensions = ["Region"], Measures = [new AnalyticsMeasure { Field = "Revenue", Aggregation = "SUM", Alias = "Revenue" }] }, DrillDown = ["Region"], Interactions = new DashboardInteractions { Filter = true, AllowSourceData = true } });

    var settings = new DashboardGenerationOptions()
    {
        MaxWidgets = 6,
        Name = "Generated sales overview"
    };

    await book.Dashboards.GenerateAsync(settings);
    return await control.SaveAsync(StreamType.InternalWorkbookFormat);
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Creating Dashboards](https://docs.textcontrol.com/tx-sheet-control/dashboards/creating/llms-full.txt)

---

## In This Section

- [DashboardGenerationOptions Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/constructor/llms-full.txt): DashboardGenerationOptions constructor in the TX Sheet Control .NET API, with its syntax, a C# example and remarks on awaiting tasks and handles.
- [DashboardGenerationOptions.FieldRoles Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/fieldroles-property/llms-full.txt): DashboardGenerationOptions.FieldRoles property in the TX Sheet Control .NET API, with its type Dictionary<string, string>? and a C# example.
- [DashboardGenerationOptions.MaxWidgets Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/maxwidgets-property/llms-full.txt): DashboardGenerationOptions.MaxWidgets property in the TX Sheet Control .NET API, with its syntax, its type int? and a C# example.
- [DashboardGenerationOptions.Name Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/name-property/llms-full.txt): DashboardGenerationOptions.Name property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardGenerationOptions.Scope Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/scope-property/llms-full.txt): DashboardGenerationOptions.Scope property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardGenerationOptions.Selection Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/selection-property/llms-full.txt): DashboardGenerationOptions.Selection property in the TX Sheet Control .NET API, with its type DashboardSelection? and a C# example.
- [DashboardGenerationOptions.SourceIds Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/sourceids-property/llms-full.txt): DashboardGenerationOptions.SourceIds property in the TX Sheet Control .NET API, with its type string[] and a C# example.
- [DashboardGenerationOptions.Strategy Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/strategy-property/llms-full.txt): DashboardGenerationOptions.Strategy property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [DashboardGenerationOptions.TargetId Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/targetid-property/llms-full.txt): DashboardGenerationOptions.TargetId property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.

---

## Nearby

- **Previous:** [DashboardDefinition.Highlight Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboarddefinition/highlight-property/llms-full.txt)
- **Next:** [DashboardGenerationOptions Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dashboardgenerationoptions/constructor/llms-full.txt)
