jsPDF-AutoTable icon indicating copy to clipboard operation
jsPDF-AutoTable copied to clipboard

How to display an array in a column instead of a row (transpose rows-columns?)

Open soleuil opened this issue 4 years ago • 1 comments

I have asked in stackoverflow but I haven't received any feedback so I thought to write here. It is not a bug or bulnerability but looking for some help. It if is not alright my apologies. I am fetching some data from a database and I have two arrays to fill out the table:

subjectsAbreviations = ["AMU","COMP","EYFM","HPM","IAC","INP","LAMU","MC","PEMUS"]

subjects = ["Análisis","Composición","Estilos y formas musicales","Historia del Pensamiento","Improv. y acompañamiento","Instrumento","Literatura y Audición musical","Música de cámara","Pedagogía musical"]

When I create the table, each one of these arrays goes to a row having a result like this:

u8udL

However, I would like to place the first array in a column and the second one in the column next to it, so it is shown as key: value. Also, I would show just two rows and the following results be added as additional columns to the right. It would be something like this:

rRpFY

I hope it is ok for me to ask here and that I can have some help. Thanks.

soleuil avatar Feb 19 '22 09:02 soleuil

This issue will soon be closed since issues in this project are mainly meant to be bugs or feature requests. Questions are directed to stackoverflow.

github-actions[bot] avatar May 26 '22 03:05 github-actions[bot]