Upgrading to 2.0.0
This guide covers the breaking changes introduced in Reveal SDK 2.0 and the steps required to upgrade an existing 1.x application to 2.0.
First follow the 1.x upgrade guides in the 1.8.4 documentation to bring your project up to 1.8.4, then return to this page to complete the move to 2.0.
Overview of Breaking Changes
- jQuery and Day.js removed — the SDK no longer depends on jQuery or Day.js.
- NPM delivery — the client SDK is now delivered as an npm package. Legacy script-tag delivery is no longer the recommended approach.
$.igandRevealApinamespaces removed — all types are now imported directly from thereveal-sdknpm package. Replace$.ig.ClassNameandRevealApi.ClassNamewith direct imports (e.g.import { ClassName } from "reveal-sdk").- Renamed and removed APIs
DateFilter- removed deprecated property fromRevealView,RVDashboard,RVDateDashboardFilter,RevealSettings,IExportOptionsand classes implementing it.Reveal.Sdk.Dashboard.ToJsonStringAsync- renamed toToJsonString.
- Deprecated types —
RVDashboardThumbnailViewhas been deprecated, in favor ofRVThumbnail.
Step-by-Step Upgrade
1. Remove jQuery
The Reveal SDK no longer requires jQuery. Remove the jQuery script tag that was previously required by the SDK:
<!-- Remove this line -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
If your own application code depends on jQuery you can keep it — the Reveal SDK simply no longer requires it.
Also remove Day.js, Quill.js and Spectrum.js if they are still present from older versions:
<!-- Remove these if present -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.min.css" rel="stylesheet" type="text/css" >
<script src="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.min.js"></script>
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet" type="text/css" >
<script src="https://cdn.quilljs.com/1.3.6/quill.min.js"></script>
<script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script>
2. Switch client SDK to NPM
Replace the legacy script-tag installation with the npm package.
- 1.x (script tags)
- 2.0 (npm)
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script>
<script src="https://dl.revealbi.io/reveal/libs/1.8.4/infragistics.reveal.js"></script>
npm install reveal-sdk
import { RevealSdkSettings, RevealView } from "reveal-sdk";
The SDK distribution zip is still available for non-bundler setups — jQuery and Day.js are no longer needed:
<script src="./assets/reveal/reveal-sdk.js"></script>
3. Update server SDK packages
- ASP.NET
- Java
- Node.js
Update the Reveal.Sdk.* NuGet packages to version 2.0.0 or later.
<PackageReference Include="Reveal.Sdk.AspNetCore" Version="2.0.0" />
1 - Update the pom.xml file, and add the Reveal Maven repository.
<repositories>
<repository>
<id>reveal.public</id>
<url>https://maven.revealbi.io/repository/public</url>
</repository>
</repositories>
2 -Add the Reveal SDK as a dependency.
<dependency>
<groupId>io.revealbi</groupId>
<artifactId>reveal-sdk-servlet</artifactId>
<version>2.0.0</version>
</dependency>
npm install reveal-sdk-node@2.0.0
4. Update API usage
$.ig / RevealApi → Direct imports
The $.ig and RevealApi global namespaces have been removed. All types are now imported directly from the reveal-sdk npm package. If you were using TypeScript with infragistics.reveal.d.ts for IntelliSense (e.g. new $.ig.RevealView), update all references to use direct imports instead.
- 1.x
- 2.0
$.ig.RevealSdkSettings.setBaseUrl("https://localhost:5111/");
var revealView = new $.ig.RevealView("#revealView");
import { RevealSdkSettings, RevealView } from "reveal-sdk";
RevealSdkSettings.setBaseUrl("https://localhost:5111/");
const revealView = new RevealView("#revealView");
DateFilter → filters + RVDateRule
The deprecated DateFilter property has been removed. Use the filters collection instead. DateFilter was eliminated from RevealView, RVDashboard, RVDateDashboardFilter, RevealSettings, IExportOptions and classes implementing it.
- 1.x
- 2.0
var myRule = new $.ig.RVDateRule($.ig.RVPeriodRelation.Last, 3, $.ig.RVPeriodType.Month);
dashboard.dateFilter = new $.ig.RVDateDashboardFilter(myRule);
import { RVDateRule, RVPeriodRelation, RVPeriodType } from "reveal-sdk";
const myRule = new RVDateRule(RVPeriodRelation.Last, 3, RVPeriodType.Month);
const myDateFilter = dashboard.filters.findByTitle("My Date Filter");
myDateFilter.rule = myRule;
RVDashboardThumbnailView → RVThumbnail
Usage of RVDashboardThumbnailView is being deprecated. The class will continue to be available for some time, but we recommend that you migrate your code to use RVThumbnail instead.
- 1.x
- 2.0
var thumbnailView = new $.ig.RevealDashboardThumbnailView("#thumbnail");
$.ig.RevealUtility.getDashboardInfo("Sales", function (info) {
thumbnailView.dashboardInfo = info.info;
});
import { RVThumbnail } from "reveal-sdk";
RVThumbnail.fromDashboard("#thumbnail", "Sales");
The new RVThumbnail API also supports runtime theme changes.
Removed APIs
| API | Replacement |
|---|---|
$.ig namespace | Direct imports from reveal-sdk |
RevealApi namespace | Direct imports from reveal-sdk |
DateFilter property | filters collection |
RVDashboardThumbnailView | RVThumbnail |
Reveal.Sdk.Dashboard.ToJsonStringAsync | ToJsonString |
| Legacy chart types (previously deprecated) | Use current Chart Types |
| Legacy Java engine | Java SDK (Spring Boot) |
Summary Checklist
- Remove jQuery
<script>tag - Remove Quill.js and Spectrum.js references if still present
- Switch client SDK to npm package (or remove jQuery from script-tag setup)
- Update server SDK packages to 2.0.0
- Replace
$.ig.andRevealApi.with direct imports fromreveal-sdkin all client code - Replace uses of
DateFilterproperty to useFilterslist instead. - (recommended) Replace
RVDashboardThumbnailViewwithRVThumbnail - Replace
Reveal.Sdk.Dashboard.ToJsonStringAsyncwithToJsonString - Verify no dashboards use removed legacy chart types
- If using the legacy Java engine, migrate to a supported server SDK
Need help?
If you run into issues during the upgrade, open an issue or reach out via the in-app chat.