We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there a way to calculate percentages for totals columns for each row corresponding to group total
Basically if there is a way to to get the group total or the row in calculations for the level above.
If not I guess we need to pass back the parent record to the template
The text was updated successfully, but these errors were encountered:
May could do something like
renderTableBody: function (columns, rows) { var self = this var parents = new Map() return ( <tbody> {rows.map(function (row) { parents.set(row._level, row) return ( <tr key={row._key} className={"reactPivot-level-" + row._level}> {columns.map(function (col, i) { if (i < row._level) return <td key={i} className='reactPivot-indent' /> var topLevelParent = parents.get(0) var previousLevelParent = row._level > 0 ? parents.get(row._level - 1) : topLevelParent return self.renderCell(col, row, topLevelParent, previousLevelParent) })} </tr> ) })} </tbody> ) },
to calculate all the parents and pass to the renderCell and from there to template methods
Sorry, something went wrong.
Hi, I just implemented this functionality of obtaining the percentage depending on the filtered group, I leave you the repository:
Pewiz/pivotReact
I made this project with a react-pivot version called react-pivot-webpack
Sorry for the delay in responding 😂. I hope this helps you or someone else 🙌
No branches or pull requests
Is there a way to calculate percentages for totals columns for each row corresponding to group total
Basically if there is a way to to get the group total or the row in calculations for the level above.
If not I guess we need to pass back the parent record to the template
The text was updated successfully, but these errors were encountered: