Menu
Content Services

Cash Bids Table Widget

Tabular display of cash bids data with the ability to connect to the cash bids charting widgets.

Installation

script

Example

                              window.dtn.cashBids.createCashBidsTableWidget({
 


                                
});
                              
                            

Types

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.

VisibleFields

type VisibleFields =
  | "BASIS_PRICE"
  | "CASH_PRICE"
  | "DELIVERY_END"
  | "DELIVERY_START"
  | "FUTURES_CHANGE"
  | "FUTURES_QUOTE"
  | "SETTLE_PRICE"
  | "SYMBOL"
  | "UNIT_OF_MEASURE"

This type describes all the available fields for customizing what data is shown in the table.

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.

siteId

siteId: SiteId;

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

visibleFields

visibleFields = VisibleFields[];

This options allows you to customize what fields are displayed in the cash bids tables. This is also responsible for defining the order of the columns in the table.

view

view?: "PRICE_MATRIX" | "DETAIL" = "DETAIL";

The view option controls which view active by default. "DETAIL", the default, will show the full cash bids details. "PRICE_MATRIX" will show the price matrix tables.

showViewOptions

showViewOptions?: boolean = true;

showViewOptions controls the visibility of the "View" radio buttons. Setting this to false will remove the ability for the users to toggle between the view modes.

groupBy

groupBy?: "LOCATION" | "COMMODITY" = "LOCATION";

The groupBy options allows you to set the default grouping. "LOCATION" will group cash bids based on their locations. "COMMODITY" will group cash bids based on their commodity type.

showGroupByOptions

showGroupByOptions?: boolean = true;

showGroupByOptions controls the visibility of the "Group By" radio buttons. Setting this to false will remove the ability for users to toggle between grouping modes.

showLocationsSelect

showLocationsSelect?: boolean = true;

showLocationsSelect controls the visibility of the "Locations" select menu. Setting this to false will remove the ability for the user to switch locations.

showCommoditiesSelect

showCommoditiesSelect?: boolean = true;

showCommoditiesSelect controls the visibility of the "Commodities" select menu. Setting this to false will remove the ability for the user to switch commodities.

defaultLocation

defaultLocation?: { locationName: string } = undefined;

The defaultLocation option allows you to set a default location by specifying the name of the location. For example if the location you wish to show is named My Location, setting defaultLocation: { locationName: "My Location" } pre selects that location.

hideLocations

hideLocations?: string[] = undefined;

hideLocations allows you to hide locations by name from the locations select menu as well as hiding all cash bids associated with that location. Location names are case-sensitive.

hideCommodities

hideCommodities?: string[] = undefined;

hideCommodities allows you to hide commodities by their name from the commodity select menu as well as hiding all cash bids associated with that commodity.

defaultCommodity

defaultCommodity?: string = undefined;

The defaultCommodity option allows you to set a default commodity by specifying the name of the commodity. For example if the commodity you wish to show is corn, setting defaultCommodity: "corn" pre selects that commodity.

Callbacks

onCashBidSelect

onCashBidSelect: (cashBid: PortalCashBid) => void;

This callback will be called whenever the chart symbol on a cash bids table is clicked.