rjaros / kvision

Object oriented web framework for Kotlin/JS
https://kvision.io
MIT License
1.2k stars 66 forks source link

How to add more than one bottomCalc rows? #526

Open chavu opened 1 month ago

chavu commented 1 month ago

Refer to the embedded image. I have successfully added the 'Totals' row using the tabulator code below. How do I add the 'Percentage of Total' Row

tabulator(
                                testingState.tableTestCaseAnalysis,
                                options = TabulatorOptions(
                                    layout = Layout.FITCOLUMNS,
                                    pagination = false,
                                    paginationSize = 4,
                                    columns = listOf(
                                        ColumnDefinition("Code", "code"),
                                        ColumnDefinition("Name", "name"),
                                        ColumnDefinition("Tests", "testsCount", bottomCalc = Calc.SUM),
                                        ColumnDefinition("Skipped", "skippedCount", bottomCalc = Calc.SUM),
                                        ColumnDefinition("Failed", "failedCount", bottomCalc = Calc.SUM),
                                        ColumnDefinition("Passed", "passedCount", bottomCalc = Calc.SUM),
                                        ColumnDefinition("Logged Issues", "issuesCount", bottomCalc = Calc.SUM),
                                    ),
                                    filterMode = FilterMode.LOCAL
                                ),
                                types = setOf(TableType.BORDERED, TableType.HOVER, TableType.STRIPED),
                                serializer = serializer()
                            )

image

rjaros commented 1 month ago

I don't think this is supported by Tabulator. There is an issue with suggested feature (https://github.com/olifolkerd/tabulator/issues/4003), but it doesn't seem to be implemented.

chavu commented 1 month ago

Noted. Thank you. I will keep an ey on the feature request.