//set true for disabled filter
var headerAndFilters = {
headerType: "header-sc-missions", // filtering header
disabledFields: // disables header fields
[
false, // platforms
false, // locations
false, // age
false, // gamers
true, // game-types
false, // date-grouping
false, // dates+builds
false, // mission categories
false, // mission ugc gamertags
false, // created dates
],
};
var items = [
{
metric: "$ R* Takings" ,
//val: function(d) {return -1*d.AmountWon + d.RockstarCommission;},
val: function(d) {return -1*d.AmountWon;}, // b* #1591546
},
/*
{
metric: "$ R* Commision" ,
val: function(d) {return d.RockstarCommission;},
},
*/
{
metric: "$ R* Payout" ,
val: function(d) {return ( d.AmountBet - (-1*d.AmountWon) );},
},
{
metric: "$ Players Takings" ,
val: function(d) {return d.AmountWon;},
},
{
metric: "$ Amount Players Bet" ,
val: function(d) {return d.AmountBet;},
},
];
var reportOptions = {
restEndpoint: config.bettingEarned,
restEndpointAsync: config.bettingEarnedAsync,
processFunction: convertToDict,
enableCSVExport: "content-description",
graphTitle: "Amount Bet",
elementId: "line-area-chart",
backgroundColour: "#ffffff",
lineColour: "#000000",
textColour: "#000000",
gridColour: "#333333",
name: function(d) { return d.name; },
fullName: function(d, extra) { return ((extra) ? this.name(d) + "
(" + extra + ")" : this.name(d)); },
value: function(d) { return round2(d.value); },
label: function(d) {return ((d.label) ? d.label : this.name(d)); },
orientation: "horizontal",
margin: {top: 10, right: 10, bottom: 10, left: 120},
//orientation: "vertical",
//margin: {top: 10, right: 10, bottom: 10, left: 200},
legend: {height: 30, width: 180, rectWidth: 18},
legendDataConst : [],
legendDataVar: {label : "", colour: "#333333"}, // keep this colour in sync with lineColour
valueTooltipContent: function(d, b) {
var content = "
| " + item.metric + ": | $ " + commasFixed2(item.val(d.values)) + " |
| Total Bets: | " + (d.values.BetsMade) + " |
| Bets Won: | " + (d.values.BetsThatWon) + " |