Need a special offer?Find out if your project fits.
+
All documentation
  • Introduction
  • Connecting to Data Source
  • Browser compatibility
  • Documentation for older versions
  • Migration guide from 2.5 to 2.6

    Our priority is to develop cool new features and to provide easy migration between versions of Flexmonster. To update to version 2.6 just follow our guide on updating to the latest version. In most cases, all existing code is fully compatible with the new version.

    The full list of new features is available in our release notes for version 2.6. There you will also find links to our tutorials explaining how to use the new features.

    XML deprecation

    The majority of our customers have already switched to using a JSON format for the reports, so the XML format is being deprecated from version 2.6. Old XML reports can be converted to JSON via an online XML to JSON converter or an npm package converter.

    Changes in the ReportObject and API calls

    Among other improvements, we have added the ability to select a measure multiple times allowing you to apply different aggregations on the same measure. For example, a revenue measure can be selected 2 times for a pivot table showing the aggregated values revenue (sum) and revenue (average). Check out the JSFiddle demo.

    In version 2.5 and earlier, the measure’s unique name was used to apply sorting, filtering on values, and table sizes. In version 2.6, since one measure can be selected multiple times, it may be necessary to provide not only the unique name of the measure but also its aggregation type to identify the measure. Thus, measure (String) is replaced with measure (Object). measure has the following properties:

    • uniqueName – String. The measure’s unique name.
    • aggregation optional – String. The measure’s aggregation type.

    The aggregation parameter is optional, it only needs to be specified when the report contains a measure with multiple aggregations.

    Example

    setTopX API call usage in version 2.5:

    flexmonster.setTopX("Category", 2, "Price");
    

    setTopX API call usage in version 2.6:

    flexmonster.setTopX("Category", 2, {"uniqueName": "Price"});
    

    "Price" is replaced with {"uniqueName": "Price"}.

    All changes are backward compatible, so code from version 2.5 will still remain functional. Moreover, if a report composed in version 2.5 is loaded into version 2.6 and then saved, the changes to the ReportObject will be applied automatically. However, if your own code composes/parses reports or uses API calls from the list below, it is recommended to update the code manually by replacing measure (String) with measure (Object). Below is a list of places where this update is necessary.

    To update in the ReportObject:

    • report.slice.sorting.row.measure
    • report.slice.sorting.column.measure
    • report.slice.rows[n].filter.measure
    • report.slice.columns[n].filter.measure
    • report.slice.expands.rows[n].measure
    • report.slice.expands.columns[n].measure
    • report.slice.drills.rows[n].measure
    • report.slice.drills.columns[n].measure
    • report.options.chart.activeMeasure
    • report.tableSizes.rows[n].measure
    • report.tableSizes.columns[n].measure

    Check out the updated structure of the ReportObject.

    To update in API calls usage:

    • getFilterProperties return has changed.
    • setBottomX input parameter has changed.
    • setTopX input parameter has changed.
    • sortValues input parameter has changed.

    Updating from previous versions

    When migrating from previous major versions, follow these tutorials: