StyleCode Property: minPrecision

🚧 Work in progress — This documents the redesigned dashboard layout system, which is still under active development and subject to change. It is not compatible with the older v1 dashboard tile system.

minPrecision

Specifies the minimum number of fractional digits to be displayed in the number pipeline.

Applies to Type Default
barchart > series > value
chart
chart > haxis
chart > value
chart > series > value
chart > series > value
chart > vaxis > left
chart > vaxis > right
frame > entry > value
frame > column > value
gauge > entry > value
linechart > vaxis > left
linechart > vaxis > right
piechart > series > value
scalar > entry > value
summary > entry > value
table > column > value
Number 0

Examples

// Example: barchart > series > value
table Items = with
  [| as SKU, as Category, as Quantity |]
  [| "AAA", "CAT_1", 10 |]
  [| "BBB", "CAT_2", 20 |]
  [| "CCC", "CAT_1", 30 |]

show barchart "My BarChart" { 1..4, 1..6 } with
  sum(Items.Quantity) { value { minPrecision: 5 } }
  group by Items.Category

// Example: gauge > entry > value
show gauge "My Gauge" { 1..3, 1..4 } with 0.5 { value { minPrecision: 5 } }

// Example: piechart > series > value
table Sales = with
  [| as Quantity, as Category |]
  [| 10, "A" |]
  [| 1, "B" |]
  [| 5, "B" |]
  [| 4, "A" |]
  [| 12, "C" |]

show piechart "My Pie Chart" { 1..4, 1..6 } with
  sum(Sales.Quantity) { value { minPrecision: 5 } }
  group by Sales.Category

// Example: scalar > entry > value
myValue = 123

show scalar "My Scalar" { 1..2, 1..2 } with
  myValue { value { minPrecision: 5 } }

// Example: summary > entry > value
table Sales = with
  [| as Quantity, as NetAmount |]
  [| 10, 40 |]
  [| 2, 10 |]
  [| 1, 20 |]

show summary "My Summary" { 1..3, 1..3 } with
  sum(Sales.Quantity) { value { minPrecision: 5 } }
  sum(Sales.NetAmount)

// Example: table > column > value
table Orders = with
  [| as Date, as Quantity |]
  [| date(2023,02,21), 150 |]
  [| date(2023,02,22), 250 |]

show table "My Table" { 1..4, 1..4 } with
  Orders.Date { value { minPrecision: 5 } }
  Orders.Quantity

User Contributed Notes
0 notes + add a note