The HarperDB Studio includes a charting feature within an instance. They are generated in real time based on your existing data and automatically refreshed every 15 seconds. Instance charts can be accessed with the following instructions:
- Navigate to the HarperDB Studio Organizations page.
- Click the appropriate organization that the instance belongs to.
- Select your desired instance.
- Click charts in the instance control bar.
Creating a New Chart
Charts are generated based on SQL queries, therefore to build a new chart you first need to build a query. Instructions as follows (starting on the charts page described above):
- Click query in the instance control bar.
- Enter the SQL query you would like to generate a chart from.
For example, using the dog demo data from the API Docs, we can get get the average dog age per owner with the following query:
SELECT AVG(age) as avg_age, owner_name FROM dev.dog GROUP BY owner_name.
- Click Execute.
- Click create chart at the top right of the results table.
- Configure your chart.
- Choose chart type.
HarperDB Studio offers many standard charting options like line, bar, etc.
- Choose a data column.
This column will be used to plot the data point. Typically this is the values being calculated in the
SELECTstatement. Depending on the chart type, you can select multiple data columns to display on a single chart.
- Depending on the chart type, you will need to select a grouping.
This could be labeled as x-axis, label, etc. This will be used to group the data, typically this is what you used in your
- Enter a chart name.
Used for identification purposes and will be displayed at the top of the chart.
- Choose visible to all org users toggle.
Leaving this option off will limit chart visibility to just your HarperDB Studio user. Toggling it on will enable all users with this Organization to view this chart.
- Click Add Chart.
- The chart will now be visible on the charts page.
- Choose chart type.
The example query above, configured as a bar chart, results in the following chart:
HarperDB Studio charts can be downloaded in SVG, PNG, and CSV format. Instructions as follows (starting on the charts page described above):
- Identify the chart you would like to export.
- Click the three bars icon ().
- Select the appropriate download option.
- The Studio will generate the export and begin downloading immediately.
Delete a Chart
Delete a chart as follows (starting on the charts page described above):
- Identify the chart you would like to delete.
- Click the X icon ().
- Click the confirm delete chart button.
- The chart will be deleted.
Deleting a chart that is visible to all Organization users will delete it for all users.