Skip to content

Commit

Permalink
[update] methods and table-shape updated
Browse files Browse the repository at this point in the history
  • Loading branch information
tbshag2 committed May 18, 2024
1 parent 637e01c commit d4ae775
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/api/config/tableshape-property.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tableShape?: {
tree?:boolean,
cleanRows?: boolean,
split?: {
left?: number;
left?: number
},
};
~~~
Expand Down Expand Up @@ -65,8 +65,9 @@ By default, `tableShape` is undefined, implying that no total row, no total colu

In the example below we apply the template to the *score* values to display 2 digits after the decimal point for these values and we add the "€" sign to the *price* values.

~~~jsx {1,6}
const templates = { price: (v) => (v ? "" + v : v), score: (v) => (v ? parseFloat(v).toFixed(2) : v) };
~~~jsx {1-2,7}
const templates = { price: (v) => (v ? "" + v : v),
score: (v) => (v ? parseFloat(v).toFixed(2) : v) };

const widget = new pivot.Pivot("#pivot", {
tableShape: {
Expand Down

0 comments on commit d4ae775

Please sign in to comment.