drawCallback and fnDrawCallback not working together

drawCallback and fnDrawCallback not working together

MichaelGrossMichaelGross Posts: 6Questions: 3Answers: 0

Hello, i have the problem that drawCallback and fnDrawCallback not working together. I need to have group Columns and sparkline chart in my Datatable. Each Section alone is working. Any can help me ?

 "drawCallback": function (settings) {
                var api = this.api();
                var rows = api.rows({ page: 'current' }).nodes();
                var last = null;

                api.column(2, { page: 'current' }).data().each(function (group, i) {
                    if (last !== group) {
                        $(rows).eq(i).before(
                            '<tr class="alert alert-success m-b-sm"><td colspan="9" class="group">' + group + '</td></tr>'
                        );
                        last = group;
                    }
                });
            },

"fnDrawCallback": function (oSettings) {
                $('.inlinesparkline:not(:has(canvas))').sparkline('html', {
                    type: 'bar',
                    barWidth: '5px',
                    barColor: 'green',
                    barSpacing: '5px',
                    height: '10px'
                });
},

Thanks
Michael

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.