Menu
Content Services

Cash Bids Chart Widget

Interactive chart widget displays cash bid prices and basis.

Installation

script

Example

                              window.dtn.cashBids.createCashBidsChartWidget({
 


                                
});
                              
                            

Types

Units

type Units = "Imperial" | "Metric";

These are the available metric systems that widget support.

SiteId

type SiteId = string;

This type describe site id data that may be used to supply the siteId property.

CashBidId

type CashBidId = number;

This type describe cash bid id that may be used to supply the cashBidId property.

PortalCashBid

type PortalCashBid = { siteId: SiteId, cashBidId: CashBidId }

This type describe portal cash bid object, containing siteId and cashBidId.

Configuration

apiKey

apiKey: string;

The widget access api key associated with your DTN account.

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.

units

units?: Units = "Imperial";

The measuring units that are used for presenting numbers in the weather forecast.

siteId

siteId: SiteId;

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

cashBidId

cashBidId: CashBidId;

The identifier for a specific cash bid.

showCurrentBasis

showCurrentBasis?: boolean = true;

Display the current basis price line. Default set to true.

show3YearAverageBasis

show3YearAverageBasis?: boolean = true;

Display the 3 year average basis price line if there is data for it. Default set to true.

show3YearAverageCashPrice

show3YearAverageCashPrice?: boolean = true;

Display the 3 year average cash price line if there is data for it. Default set to true.

Methods

setCashBid

setCashBid: (portalCashBid: PortalCashBid) => void;

Set the portal cash bid and load the widget with it.

Callbacks

onCashBidChange

onCashBidChange: (newPortalCashBid: PortalCashBid) => void;

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