Author Topic: Stats token options  (Read 1603 times)

SPO Director

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Seattle Poker Open
Stats token options
« on: September 16, 2014, 05:22:53 AM »
This is my first time using the stats/db feature of TD.

So I'm currently using the <stats> token in a cell to show the data on screen in a screen set.  I know there is another method, exporting html and referencing it in a layout, but I'm trying to keep as few moving parts as possible, for simplicity sake.

So I'm curious if I have any control over how the stats token displays things when used in a layout?  

  • Is it possible to change the column widths?  I see I can adjust the spacing with a variable, but that adjusts all columns the same (leaving my rank column insanely wide for only 1-2 digits of data).
  • Are they any controls for font/sizing/color for the player info?  I see variables for the header/footer....
  • Can the number of decimals displayed be changed by column?  IE: can the points column be rounded to a whole number, while the Average would stay at two digits past the decimal?
If there is a better way to achieve this, I'd love to hear it!
« Last Edit: September 16, 2014, 05:32:02 AM by SPO Director »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Stats token options
« Reply #1 on: September 16, 2014, 09:41:24 AM »
Quote
Is it possible to change the column widths?  I see I can adjust the spacing with a variable, but that adjusts all columns the same (leaving my rank column insanely wide for only 1-2 digits of data).

Nope.  Unlike columns in the Settings window, the <stats> token lays things out in a simple HTML table, which means each column will be as wide as is necessary to display the data in that column (the widest cell in the column is going to dictate the width).

Quote
Are they any controls for font/sizing/color for the player info?  I see variables for the header/footer....

Yes, you can control the font for the header and for the body of the table (separately).  To do this you're going to want to use the Insert Token dialog (basically the token builder), to interactively select the font and have the TD build the token for you - as it gets a little ugly.  So, edit the cell and then click on the cell Contents to edit the contents.  Select all or part of the <stats> token and then press the Insert Token button.  This will open the Insert Token dialog and should take you directly to the <stats> token.  There you can select the headerRowFont and the bodyRowsFont.  When you're done press OK and the updated token will be inserted back into the cell's Contents, and it will look something like this:

<stats headerRowFont='{"Name":"Tahoma","Size":18,"Bold":false,"Italic":false,"Color":"black","BGColor":"white","Underline":false}' bodyRowsFont='{"Name":"Tahoma","Size":18,"Bold":false,"Italic":false,"Color":"white","BGColor":"black","Underline":false}'>

Quote
Can the number of decimals displayed be changed by column?  IE: can the points column be rounded to a whole number, while the Average would stay at two digits past the decimal?

On the Preferences tab -> Currency / Numbers section, you'll find inputs for Points precision and Score precision.  Unfortunately, precision for averages is also controlled by the items being averaged.  So you can't have Points with a precision of 0 and Average Points with a precision of 2.   :(

SPO Director

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Seattle Poker Open
Re: Stats token options
« Reply #2 on: September 16, 2014, 04:30:57 PM »
Thanks again Corey! 

SPO Director

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Seattle Poker Open
Re: Stats token options
« Reply #3 on: September 16, 2014, 04:58:07 PM »
One more thing: can the stats scroll automatically on the screen in the cell?  I've increased the font that it won't display all players.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Stats token options
« Reply #4 on: September 17, 2014, 07:54:07 AM »
One more thing: can the stats scroll automatically on the screen in the cell?  I've increased the font that it won't display all players.

Not at this time.  I've considered it (I think there's a to-do item for this), but it hasn't been a high priority.