Menu
AgHost Content Services

Example

window.dtn.cashBids.createCashBidsChartWidget({
    "container": "#cash-bids-chart-widget",
    "token": "oViXqthDGFNVw3IvAsnKrFG1AcfPyA6b",
    "baseUrl": "https://test-api.dtn.com",
    "locale": "en_US",
    "siteId": "E0010801",
    "cashBidId": 2849777
});

Configuration

token

token: string;

The widget access token associated with your DTN account.

locale

locale: enum ["en_US"];

The language to display the widget.

container

container: HTMLElement | string;

The container to mount the widget on. This can be a reference to an HTML element, or a valid selector string. If a string is encountered, document.querySelector will be used to search document for the container.

siteId

siteId: string;

The Site Identifier used when setting up the account in Portal Publisher.

cashBidId

cashBidId: number;

The identifier for a specific cash bid.

Callbacks

loadingStateDidChange

loadingStateDidChange: (loading: boolean) => void;

This callback will be called whenever the loading state changes. The callback takes a single argument which represents the new loading state.

onError

onError: (error: string) => void;

This callback will be called whenever the error state changed. The callback takes a single argument which represent the new error state.

Methods

setNewCashBidId

setNewCashBidId: (cashBidId: number) => void;

Set new cash bid id to the widget and make fetch request for it.