Charting Time Series Data from a kdb+ Database
The images below demonstrate generating charts using a sqlDashboards with a kdb+ Database. Each query is entirely standalone and does not require defining a database.
Contents
- Bubble Chart of Single series
- Pie Chart of Single Pie Chart Example
- Pie Chart of Multiple Pie Chart Example
- Scatter Plot of Country Population and GDP
- Time Series of Day Sines
- Histogram of Profit Distribution
- Line Chart of Multiple series with many categories on the X-axis
- Line Chart of Multiple series
- Candlestick of Rising Prices, No Volume
- Candlestick of Prices going up
- Line Chart of Single Category
- Candlestick of Rising Prices, Only High Low Columns Shown
- Heat Map of Country GDP's
- Data Table of Many Columned Table
- Line Chart of Multiple Series with Time X-Axis
Bubble Chart of Single series

The three columns are used for x-axis,y-axis and size respectively. Notice the GdpPerCapita column has been divided to make it similar sized to the othercolumns so that the bubbles are a sensible size.
Pie Chart of Single Pie Chart Example

A single numerical columns gives a single pie chart for that column.
Pie Chart of Multiple Pie Chart Example

Using multiple numerical columns gives a pie chart for each column.
Scatter Plot of Country Population and GDP

The first column GDP is used for the x-axis. The subsequent columns are then plotted against that x axis as separate colored series.
Time Series of Day Sines

A sine/cosine wave over a period of days.
Histogram of Profit Distribution

Distribution of Returns and Losses
Line Chart of Multiple series with many categories on the X-axis

Each column is a new series/colored bar. When there are a lot of categories, some labels are hidden.
Line Chart of Multiple series

Each column is a new series/colored bar.
Candlestick of Rising Prices, No Volume

A candlestick showing only price movements, no volume column.
Candlestick of Prices going up

A Candlestick showing price movements and fluctuating volume over a period of 6 weeks
Line Chart of Single Category

One number column generates one series.
Candlestick of Rising Prices, Only High Low Columns Shown

A candlestick showing only high low prices.
Heat Map of Country GDP's

The continent column is a top-level branch, the country column becomes leafs.The first two columns are GDP and GDP per Capita which become the size and color of the leafs respectively.
Data Table of Many Columned Table

All rows/columns will be shown as a plain table.
Line Chart of Multiple Series with Time X-Axis

2 series are shown, one for Sales, One for Costs. x-axis is in months.