Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom expression for numbers formatting #9478

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/user_manual/introduction/general_tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2005,10 +2005,11 @@ screen resolution, paper size, or the terrain). Available units are:
Number Formatting
-----------------

Numeric formatters allow formatting of numeric values for display, using
a variety of different formatting techniques (for instance scientific notation,
currency values, percentage values, etc). One use of this is to set
text in a layout scale bar or fixed table.
Numeric formatters allow formatting of numeric values for display,
using a variety of different formatting techniques
(for instance scientific notation,
currency values, percentage values, custom formatting, etc).
One use of this is to set text in a layout scale bar or table, a color ramp legend, an elevation profile plot, ...

.. _figure_number_formatting:

Expand All @@ -2028,6 +2029,11 @@ But they can also have their custom settings. Provided categories are:

* :guilabel:`General`, the default category: has no setting and displays values
as set in the parent widget properties or using the global settings.

* :guilabel:`Custom expression`: allows you to craft a custom :ref:`QGIS expression <vector_expressions>` to format numbers.
The expression can use the ``@value`` variable to retrieve the value to be formatted,
and then use any standard QGIS expression function to format this as desired.

* :guilabel:`Number`

* The value can be :guilabel:`Round to` a self defined number of
Expand Down
Loading