Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - Adding border option TOP border doesn't display for specified row #1318

Open
1 of 4 tasks
whoami999 opened this issue Feb 7, 2024 · 2 comments
Open
1 of 4 tasks

Comments

@whoami999
Copy link

We appreciate your feedback - to help the team understand your needs please complete the following template to ensure we have the details to help.

Submission Guidelines

  • If you are not using the latest release, please update and see if the issue is resolved before submitting an issue Believe I am at least stable and not the beta.
  • General questions or high-level topics should be posted in Discussions. I looked for resolutions and doing one row up and applying the bottom border isn't acceptable.
  • Please browse the online Documentation to see if your question is already addressed there. Tried browsing many locations.

Issue Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Product Versions

  • Please specify what version of the library you are using: 3.12.0
  • Please specify what version(s) of PowerPoint you are targeting: Office 365
  • Please specify what web browser you are using: Chrome

Desired Behavior

let rows = [
[
{ text:'Top Lft', options:{ valign:'t', align:'l', font_face:'Arial' } },
{ text:'Top Ctr', options:{ valign:'t', align:'c', font_face:'Verdana' } },
{ text:'Top Rgt', options:{ valign:'t', align:'r', font_face:'Courier' } }
],
[
{ text:'Middle Lft', options:{ valign:'t', align:'l', font_face:'Arial',
border: {type: 'solid', pt: 1.5, color: '#A98989'} } },
{ text:'Middle Ctr', options:{ valign:'t', align:'c', font_face:'Verdana' } },
{ text:'Middle Rgt', options:{ valign:'t', align:'r', font_face:'Courier' } }
]
];
let tabOpts = { x:0.5, y:3.5, w:9.0, rowH:0.6, fill:'F7F7F7', font_size:18, color:'6f9fc9', valign:'m'}
slide.addTable( rows, tabOpts );

I would expect the 'Middle Lft' cell to have all borders as defined, solid, 1.5pt, and color #A98989

The intent of wanting to put a more defining border around an entire row. Also, table has a bunch of rows above and then have a aggregation of it and want a solid line Top border for the aggregation total row.

Observed Behavior

With having a non-top row cell defined with a border of type solid, pt 1.5, and color: A98989

All I get is a cell with Left, Right, and Bottom borders as defined.

Steps to Reproduce

If you go to: https://jsfiddle.net/gitbrent/L1uctxm0/
Paste in the below for the script file Javascript-pureJS

let pptx = new PptxGenJS();
$('small').before('(pptxgenjs version: ' + pptx.version + ')');

// Simple Slide
window.doDemo = function do7cells() {
let pptx = new PptxGenJS();
let slide = pptx.addSlide();
let opts = {
x: 0.0,
y: 0.25,
w: '100%',
h: 1.5,
align: 'center',
fontSize: 24,
color: '0088CC',
fill: 'F1F1F1'
};
slide.addText(
'BONJOUR - CIAO - GUTEN TAG - HELLO - HOLA - NAMASTE - OLÀ - ZDRAS-TVUY-TE - こんにちは - 你好',
opts
);

let rows = [
[
{ text:'Top Lft', options:{ align:'left', font_face:'Arial' } },
{ text:'Top Ctr', options:{ align:'center', font_face:'Verdana' } },
{ text:'Top Rgt', options:{ align:'right', font_face:'Courier' } }
],
[
{ text:'Middle Lft', options:{ valign:'top', align:'left', font_face:'Arial',
border: {type: 'solid', pt: 1.5, color: '#A98989'} } },
{ text:'Middle Ctr', options:{ valign:'middle', align:'center', font_face:'Verdana' } },
{ text:'Middle Rgt', options:{ valign:'bottom', align:'right', font_face:'Courier' } }
]
];
let tabOpts = { x:0.5, y:3.5, w:9.0, rowH:0.6, fill:'F7F7F7', font_size:18, color:'6f9fc9', valign:'m'}
slide.addTable( rows, tabOpts );

pptx.writeFile();
}

@whoami999
Copy link
Author

whoami999 commented Feb 7, 2024

let rows = [
[
{ text:'Top Lft', options:{ align:'left', font_face:'Arial'} },
{ text:'Top Ctr', options:{ align:'center', font_face:'Verdana' } },
{ text:'Top Rgt', options:{ align:'right', font_face:'Courier' } }
],
[
{ text:'Middle Lft', options:{ valign:'top', align:'left', font_face:'Arial' } },
{ text:'Middle Ctr', options:{ valign:'middle', align:'center', font_face:'Verdana',
border: [
{type: 'solid', pt: 1.5, color: '#A98989'},
{type: 'solid', pt: 2.5, color: '#A98989'},
{type: 'solid', pt: 3.5, color: '#A98989'},
{type: 'solid', pt: 3.5, color: '#A98989'}]
} },
{ text:'Middle Rgt', options:{ valign:'bottom', align:'right', font_face:'Courier' } }
]
];

Utilizing that for the rows, we notice that non first column Left borders are not styled. So, Right and Bottom styles are being applied but not the left and top border styles unless it is the first column or first row.

@64237442
Copy link

I meet this problem,too!Do you have any solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants