Data Types (Custom Formats) in Charts and Tables

I have created a dashboard that contains a couple of tables and a few charts. What’s the best way to “retain” the column’s data type?

For example, I have a chart where the yAxes is supposed to show how much has been spent over a certain period. I would like for the ticks to include a dollar sign before each value. I found the following for chartjs but no luck,

options: {
        scales: {
            yAxes: [{
                ticks: {
                    // Include a dollar sign in the ticks
                    callback: function(value, index, values) {
                        return `$` + value;
                    }
                }
            }]
        }
    }

Additionally, how do you create custom formats for a table that was created using SQL queries?

Product: PowerShell Universal
Version: 1.4.6

We don’t have a way of formatting tick labels right now. I’ll add something to the backlog.

For the table, are you looking for custom cell rendering?

https://docs.ironmansoftware.com/dashboard/components/data-display/table#table-with-custom-column-rendering

Although that example shows buttons, you could format the cell however you want.

Thank you, I’m looking forward to using the ticks.

That’s exactly what I needed. Thank you again.

New-UDTableColumn -Property Amount -Title “Amount” -Render {
$Item = $Body | ConvertFrom-Json
New-UDElement -tag ‘div’ -Content {“`$$($Item.Amount)” }
}