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

Right align few columns

Open ankur2728 opened this issue 11 years ago • 7 comments

Hi,

Can we right align any column header and data. Please respond asap. need it very urgently if it is possible

Thanks

ankur2728 avatar Jun 26 '15 09:06 ankur2728

Yes! You have to do it yourself however in the drawCell function like in the custom style example (demo).

simonbengtsson avatar Jun 26 '15 09:06 simonbengtsson

Thanks for your quick response. Which code block this represents.

ankur2728 avatar Jun 26 '15 09:06 ankur2728

Check for if (key === 'expenses') {

simonbengtsson avatar Jun 26 '15 11:06 simonbengtsson

I tried the code. Its working but linebreaks are failing coz of this code.

ankur2728 avatar Jun 26 '15 11:06 ankur2728

Try the solution in #43. I will update the examples as soon as possible with this fix.

simonbengtsson avatar Jun 26 '15 11:06 simonbengtsson

Marking this as an enhancement as it will be easier to add right aligned columns in version 2.0 which I'm at work on now.

simonbengtsson avatar Jun 29 '15 23:06 simonbengtsson

Version 2.0 is now released and this is now easy to do using the halign style set to right.

simonbengtsson avatar Aug 24 '15 20:08 simonbengtsson