Skip to content

Commit

Permalink
docs: fix formatting details for changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
dm-p committed Jun 24, 2024
1 parent a2b11b7 commit ec03ac3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ Previously, any specific editor changes you'd made, such as folding/collapsing s

### `pbiFormat` Changes

As Vega-Lite provides some flexibility in the `format` property for custom format types, you can now supply an object or the desired format string. Refer to the Formatting Values page for further details.
As Vega-Lite provides some flexibility in the `format` property for custom format types, you can now supply an object or the desired format string. Refer to the [Formatting Values](formatting#object-example) page for further details.

### `pbiFormatAutoUnit` Format Type

This format type has been added as a convenience to emulate _Auto_ units, commonly used in other Power BI visuals. This will use the same logic that Power BI uses to convert values to K, M, Bn, etc. Refer to the Formatting Values page for further details.
This format type has been added as a convenience to emulate _Auto_ units, commonly used in other Power BI visuals. This will use the same logic that Power BI uses to convert values to K, M, Bn, etc. Refer to the [Formatting Values](formatting#auto-formatting-with-pbiformatautounit) page for further details.

### `pbiContainer` Signal

Expand Down
3 changes: 3 additions & 0 deletions docs/deeper-concepts/formatting-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ This results in something a little more human-readable:

![vega-lite-billions.png](./img/vega-lite-billions.png "After applying a Power BI format string and specifying our custom formatter, the axis becomes much more human readable. This updates to show tick values as $bn, to one decimal place.")

<div id="object-example"></div>
:::info Vega-Lite's format property is extensible
The `format` property can also expect an object instead of a string. If you use an object for the `pbiFormat` or `pbiFormatAutoUnit` format types, you can use an object that can include any of the optional `ValueFormatterOptions` properties from [Microsoft's formatting library for custom visuals](https://learn.microsoft.com/en-us/power-bi/developer/visuals/utils-formatting?WT.mc_id=DP-MVP-5003712#valueformatteroptions). The following example is synonymous with the above one:

Expand Down Expand Up @@ -224,6 +225,8 @@ When using `pbiFormat` in an expression function, you have a bit more versatilit

```
pbiFormat(value, format, options = {})
pbiFormat(value, options = {})
```

- The `value` parameter is the number value that you wish to format.
Expand Down

0 comments on commit ec03ac3

Please sign in to comment.