Skip to main content
Skip to main content

Text-to-Chart

ClickStack's Text-to-Chart feature allows you to create visualizations by describing what you want to see in plain text. Rather than manually selecting metrics, filters, and group-by fields, you can type a prompt such as "error rates by service over the last 24 hours" and ClickStack will generate the corresponding chart automatically.

This feature uses a large language model (LLM) to convert your text prompt into a query, then builds the visualization in the Chart Explorer. It works with any configured data source.

Prerequisites

Text-to-Chart requires an Anthropic API key. Set the ANTHROPIC_API_KEY environment variable when starting ClickStack.

For open source deployments, pass the key as an environment variable. The method varies by deployment type:

docker run -e ANTHROPIC_API_KEY='<YOUR_KEY>' -p 8080:8080 -p 4317:4317 -p 4318:4318 clickhouse/clickstack-all-in-one:latest

Using Text-to-Chart

Select Chart Explorer from the left menu in HyperDX.

Select a data source

Choose the data source you want to visualize — for example, Logs, Traces, or Metrics.

Enter a text prompt

At the top of the Chart Explorer, locate the AI Assistant input. Type a natural language description of the chart you want to create. For example:

  • Show error rates by service over the last 24 hours
  • Latency breakdown by endpoint
  • Count of events over time grouped by severity

ClickStack converts the prompt into a query and renders the visualization automatically.

Trying it with demo data

The quickest way to try Text-to-Chart is with the Local Mode Docker image and the remote demo dataset:

docker run -e ANTHROPIC_API_KEY='<YOUR_KEY>' -p 8080:8080 clickhouse/clickstack-local:latest

Navigate to localhost:8080. To connect to demo data, go to Team Settings and create a new connection with the following details:

  • Connection Name: Demo
  • Host: https://sql-clickhouse.clickhouse.com
  • Username: otel_demo
  • Password: Leave empty

Then modify each of the sources — Logs, Traces, Metrics, and Sessions — to use the otel_v2 database. For full details on configuring sources, see the remote demo dataset guide.

Once connected, open the Chart Explorer and try prompts against the available logs, traces, and metrics.

Example prompts

The following prompts demonstrate common use cases when working with observability data:

PromptData sourceDescription
Error count by service over timeLogsCharts the frequency of errors across services
Average request duration grouped by endpointTracesShows latency patterns per endpoint
P99 latency by serviceTracesIdentifies tail latency across services
Count of 5xx status codes over the last 6 hoursLogsTracks server error trends

Prompts can reference any column or attribute available in your configured data sources. The more specific the prompt, the more accurate the generated chart.

Limitations

  • Text-to-Chart currently supports Anthropic as the LLM provider. Support for additional providers, including OpenAI, is planned for future releases.
  • Only logs and traces are supported as data sources. Prometheus metrics are not yet supported.
  • Chart accuracy depends on the clarity of the prompt and the structure of the underlying data. If a generated chart does not match expectations, try rephrasing the prompt or specifying column names explicitly.

Further reading