KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

ChartTable chart displays improperly after sorting table #2736

Open Brandon opened this topic on on Jun 22, 2022 - 3 comments

Brandon commented on Jun 22, 2022

When using ChartTable, if the table is sorted before generating a chart, the horizontal axis values no longer align with the correct vertical axis values. This error can be replicated in the ChartTable example on https://www.koolreport.com/examples/reports/charttable/charttable/ by sorting by dollar_sales and then generating a chart with label column: productName and data columns: dollar_sales

Am I missing something? Or is this as bug?

Thanks

Sebastian Morales commented on Jun 23, 2022

You are correct. This is a bug with ChartTable. We will fix this soon for the next version of ChartTable. Tks a lot!

Sebastian Morales commented on Jun 23, 2022

Hi Brandon, while waiting for the next version of ChartTable, you can try this fix yourself:

1 . Open the file koolreport/charttable/assets/js/charttable.js and replace this line:

                if (i === 0) labels.push(this.data[j][labelCol || "Series " + j]);

with this one:

                if (i === 0) labels.push(tableData[j][labelCol || "Series " + j]);

Let us know how it works for you. Tks,

Brandon commented on Jun 23, 2022

This fix works for me. Thank You

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

None