Format Your Query Results

At times you may want to adjust the format for the result returned by the Keen IO Compute API.

Below you’ll find examples that show how to adjust date and number formats using the keen-analysis.js and keen-dataviz.js libraries. These two examples are most commonly requested by businesses creating revenue or BI reports.

Chart Results Weekly (ex: Monday to Monday)

Keen IO’s API defines weekly from Sunday to Sunday, customize “weekly” to your company’s practices. In this example, we re-define weekly as Monday to Monday.

Re-format Currency

Format a metric chart’s data to display the format for currency commonly used: $1,000.00