8.9.0 to 9.0.0

Version 9.0.0 adds dynamic baseline charts, an external keyfile for easier upgrading, the abilities to share live charts and to share directly to Twitter and Teams, timezone data reorganization, and histogram charts that now allow single bars to span across multiple lower time periods. See the release notes for more information.

Keyfile

9.0.0 moves the details of your subscription into a file outside the ChartIQ bundle. That way, when you extend or otherwise change your subscription, you can simply replace key.js without having to recompile and redeploy your web application.

If you are continuing to use an html template from before version 9.0.0, you will need to import key.js and call the new function getLicenseKey in order to validate your subscription:

import getLicenseKey from "./key.js";
getLicenseKey(CIQ);

You can see examples of this code in the sample templates we provide in the examples/templates folder of the library.

Using the keyfile with compiled applications

If you are using a framework or compiling your application with webpack, the new keyfile feature allows you to extend your license without recompiling and redeploying your app. There are three main steps:

  1. Manually deploy the file key.js somewhere outside your compiled bundle.

  2. In the <head> element of your page template (e.g. index.html), apply key.js as a module by adding a <script> tag with "module" as its type and the location of key.js as its source. For example:

    <head>
        <!-- other code -->
        <script type="module"
            src="<your deployed keyfile's location>">
        </script>
    </head>
    

    This will automatically add the function getLicenseKey to the global window object.

    Note: Your script tag needs to be in the head so that it runs before getLicenseKey is called.

  3. In your main chart container (e.g. Core.jsx in the folder react-components/src/Chart/Core.jsx):

    • Delete or comment out the line importing getLicenseKey from "chartiq/key.js"
    • Update the next line to call getLicenseKey from the global windows object.

    For example:

    //import getLicenseKey from "chartiq/key.js";
    windows.getLicenseKey(CIQ);
    

Time Zone

We have moved our sample time zone data and rules into their own file, timezones.js in the examples/markets folder of the library. If you are using an older template, you will need to import this new file:

import "./examples/markets/timezones.js";

If you have modified or added to the default time zone data or rules, you will need to apply those changes to the CIQ.timeZoneMap and timezoneJS objects after timezones.js has been imported.

Chart Sharing

If you want to enable sharing live charts, you will need to set up and host your own database service where you can save chart configuration objects with corresponding IDs. For guidance to create the additional necessary functionality that completes this feature, see the Sharing live charts tutorial.

To enable direct sharing to Twitter and Microsoft Teams, see Enabling direct sharing buttons.