SmartChartAdapter
Wisej.AI.Adapters.SmartChartAdapter
Namespace: Wisej.AI.Adapters
Assembly: Wisej.AI (3.5.0.0)
Represents an adapter that enhances a chart control with AI features.
public class SmartChartAdapter : SmartAdapter
The SmartChartAdapter
class extends the functionality of a chart control by integrating AI capabilities. It allows for dynamic chart generation and interaction based on the provided data source and prompt.
Constructors
SmartChartAdapter()

Initializes a new instance of the SmartChartAdapter class.
Properties
DataSource

Object: Gets or sets the data source for the chart. (Default: null
)
The data source is used by the AI to generate the chart based on the specified prompt.
DefaultChartType

String: Gets or sets the default chart type to be used. (Default: "Bar"
)
Description

String: Gets the description of the chart generated by the adapter.
The description is generated based on the AI response to the provided prompt and data source.
Prompt

String: Gets or sets the prompt used to generate the chart. (Default: null
)
Changing the prompt will trigger a re-run of the AI process if AutoRun is enabled and controls are present.
Methods
OnControlCreated(control)

Called when a control is created and initializes the AI process if AutoRun is enabled.
RunAsyncCore(control)

Executes the core AI process asynchronously to generate a chart.
Returns: Task<Message>. A task representing the asynchronous operation, with a Message containing the AI response.
The method uses the provided data source and default chart type to interact with the AI session and generate a chart description.
Inherited By
Represents an adapter that enhances a ChartJS control with several AI features.
Implements
Represents a provider that supplies tools.
Last updated