Recharts
Rework pending, no delivery date. The Front App SDK (ReactJS) and the Front API SDK (NodeJS) are both being replaced. This page documents the current release, remains accurate, and is maintained until the replacement ships. Code written against it keeps working.
ReCharts is a graphic library for ReactJS.
It is possible to easily add and configure ReCharts in your application.
Recharts Configuration
When configuring a ReCharts with JSON, 2 kind of attributes are available:
- Natives: all existing ReCharts Options
- Platform: offers further customization and integration with the platform features
The Recharts data field is automatically filled from the results of the Analytics Manager request provided in the Chart definition.
Platform additions
fpFormat
Use fpFormat, to customize what is displayed on an axis.
For instance :
It uses the same definition as measure's formatter. It is also possible to re-use an already defined formatter by just specifying its name.
colors
Use colors to provide an array of colors to be used by the chart.
i18n
Use i18n to provide translations dedicated to that chart.
Those translations are used to create labels in legends and tooltips built upon Analytics Manager request:
fieldname used indata.fieldsandscale.fieldscompute modeused indata.fieldssuch asselect,sum,count,avg...
Code below replace sum by Sum of and rides by Rides inside chart tooltips for engligh language.
series
Use series to define options to be applied to data series from the request.
It is either an Array of Object or an Object (keys are fields definition and values are options).
Main options in series are :
In the following example, yAxis should be defined as described in Recharts yAxis asn an Array with 2 Objects, each of them define an yAxisId used below.
tickStyle
Use tickStyle inside of xAxis or yAxis to define style applied to tick (i.e. label at axis levels).
Main options in tickStyle are :
tooltip
Use tooltip to customize tooltip styles.
This configuration might be defined once for all in ./config/templates.json.
Main options in tooltip are :
Examples
Sample 1 (Bar Chart)
Here is a simple bar chart displaying the total number of rides per week day, with a custom bar color and styled x-axis ticks:
The request sums the rides measure, scaled by week_day, and the series block styles the resulting bars. Any other option from the Recharts Bar API can be added to the series object in the same way.
Sample 2 (Bar/Line Chart)
Sample 3 (Pie Chart)
Here is a simple pie chart definition:
That displays:

By doing some additions, we will improve this layout:
- adding
chart.request.dictionariesto translateweek_dayusing label defined in Lakehouse Manager - using `chart.options.series* to define some Recharts Pie configuration
- using some additional platform options:
radiusRatioin aserueobject: to control at which distance labels are drawn (default is 2.5)chart.options.labelsset tofalsewill hide labels- whether
chart.options.labels.minPercentis set, only values over will be displayed

The former Query Builder evol feature, which produced automatic time-period comparisons such as a year-over-year dual pie, is not available in the Analytics Manager. To compare two periods, use two chart components, each with its own request.
Streamline using templates
It is highty advised to use Templates to define Chart styles rather than copying same definition over and over.
To do so, just add a recharts object in ./config/templates.json such as for example :

