WidgetsTop Performers → Documentation & Demo
Demo
Documentation
Widget description
This widget provides examples of the top performers within the social community ranked by profitability.
Configurable parameters
fetchDataUrl
Url of the social server
(Please contact Leverate's administrator for this info)
maxItems
The amount of items that will be displayed in the grid
profitPoint
The position of the gained profit that will be displayed
language
The language key (e.g. 'en')
copyClick(item)
A callback function for the Copy action of each row, the item is a json object with the row data
showTabs
Should show the period selection tabs
defaultPeriod
Select the default period to show, also works when tabs are hidden Possible values are (1,2,3)
for the periods of (1 Month, 3 Months, 6 Months)

(default: 1)
columnsOrder
An array of column names that determines which data is displayed and in what order. Possible column names:

"position": Users performance ranking
"avatar": Social avatar image
"nickname": Social nickname
"bestPosition": Profit from user's best position
"days": Days past since joining the social community
"winRate": Percentage of user's successful trades
"copiers": How many people are coping this user
"profit": Profit made during the period
"copyButton": Shows the copy button, bound to copyClick callback

(default: ["position", "avatar", "nickname", "profit", "copyButton"])
Implementation example
* Please add the script before the </body> tag.
* If you are already using jQuery please remove the 'Framework.jQuery.js' from the 'js.src'.
                
<script type="text/javascript"> (function () { var clientUrl = "http://developers.sirixtrader.com"; var js = document.createElement('script'); js.type = 'text/javascript'; js.async = true; js.src = clientUrl + '/PageScripts/GetJavaScript/?files=Framework.jQuery.js;Framework.jQuery.Tpl.js;TopPerformers.Widget.js&callback=onPerformersWidgetLoad'; document.getElementsByTagName('head')[0].appendChild(js); var css = document.createElement('link'); css.type = 'text/css'; css.async = true; css.rel = 'stylesheet'; css.href = clientUrl + '/PageScripts/GetCss/?files=TopPerformers.Widget.css'; document.getElementsByTagName('head')[0].appendChild(css); onPerformersWidgetLoad = function () { $('#top_performers').leverateTopPerformers({ socialWidgetClientUrl: clientUrl, fetchDataUrl: 'https://social-mt2.forexwebservices.com', maxItems: 10, profitPoint: 3, language: 'en', copyClick: function (item) { }, showTabs: true, defaultPeriod: 1, columnsOrder: ["position", "avatar", "nickname", "profit", "copyButton"] }); } })(); </script>