Skip to content

ChartFactor Node

The ChartFactor Node data provider allows ChartFactor to interact with a ChartFactor Node server. A ChartFactor Node server allows you to execute ChartFactor data providers on the server-side. To set up the ChartFactor Node data provider in your web data application, you need include its library as shown below:

1
<script src="./cft-cfnode-provider.min.js"></script>

The Provider JSON object requires the url parameter in addition to name and provider parameters. Example:

1
2
3
4
5
6
// define providers
var providers = [{
    name:'CFNode',
    provider:'cfnode',
    url:'https://127.0.0.1:3123'
}]

Then, use the setProviders() method of ChartFactor to set your data provider definitions. Example:

1
cf.setProviders(providers);

This data provider assumes your ChartFactor Node server is fronted with an HTTP REST server with the following operations:

  • POST /visualize: In the body of the POST request should be the configuration needed to execute the query on the target provider and will return the values obtained after execute the requested query.

  • POST /runCountQuery: In the body of the POST request should be the configuration needed to execute the count query on the target provider and will return the count value obtained after execute the query.

  • POST /runRawQuery: In the body of the POST request should be the configuration needed to execute the raw query on the target provider and will return the raws values obtained after execute the query.

  • POST /getConfigParameters: In the body of the POST request should be the target type and this endpoint will return all the configuration needed to instantiate this provider.

  • POST /getDatasources: In the body of the POST request should be the target and this endpoint will return all the datasources from this target.

  • POST /getDatasource: In the body of the POST request should be the source id (composed the_target::the_data_source) and this endpoint will return the metadata from this data source.

  • POST /getDatasourceById: similar to getDatasource, but allows to request for containers.

Please contact the Aktiun team if you would like more details and available options to provide a REST front to your ChartFactor Node server.

Supported Aggregations Out-Of-The-Box

The supported aggregations are the same as the targets supported aggregations.

Supported target providers

  • Elasticsearch
  • Google BigQuery
  • PostgreSQL and Redshift