Create a chart
To add a chart to your dashboard, follow the steps below:
-
In the upper-right corner of your workbook page, click Create → Wizard chart.
-
Open your dashboard.
-
Click Add → Chart.
-
Select a dataset from the list.
-
Click the chart type field on the right of the dataset section and select the type from the drop-down list.
-
Drag and drop Measures and Dimensions to the appropriate sections of the chart. Depending on the chart type, specify any other settings. Your chart will appear in the workspace on the right.
-
Click Save in the upper-right corner of the page.
-
Give your chart a name and click Done.
-
Choose the right location for your chart by dragging it around the dashboard.
-
Click Save in the upper-right corner of the page.
Warning
Before creating a QL chart, configure the connection the data from which you want to visualize:
-
Go to your Workbook page.
-
Under Connections, open the information page of the connection you want to visualize.
-
Under Raw SQL level, select Allow subselects in datasets and queries from charts.
-
Click Save changes.
-
In the upper-right corner of your workbook page, click Create → QL Chart. You'll see the chart creation interface. It consists of two main sections:
-
Query section. Here you can write the SQL query you want to visualize.
-
Chart and dataset preview section. Here you can select the chart type you want to apply to your visualization.
Below the chart preview, you'll see the data table consisting all the data received from your cluster via the SQL query.
-
-
In the Query section, under Select connection to start, click Select. Choose the connection to the database you want to visualize.
-
Write a query for the data visualization:
![ql-chart-query](../../../_assets/data-visualization/concepts-charts/ql-chart-query.png "QL chart query example" ==80x)
Tip
In this section, DoubleCloud Visualization uses a live suggestions engine to accelerate and simplify query writing.
-
In the chart and dataset preview section, click the chart type to select the visualization suitable for your data (line chart by default).
-
Click Run to see the chart preview with the visualized data from the query.
-
Click Save in the upper-right corner of the page.
You can create the following chart types with DoubleCloud API:
- Stacked area chart
- Normalized stacked area chart
- Bar chart
- Normalized bar chart
- Column chart
- Normalized column chart
- Donut chart
- Pie chart
- Indicator
- Pivot table
- Scatter chart
- Table
- Tree chart
For detailed instructions on how to describe a chart type, click one of the links above and select the API tab.
To learn more about each chart type's features, see Charts reference.