Chartbuilder icon indicating copy to clipboard operation
Chartbuilder copied to clipboard

Add aspect ratios for social images

Open duner opened this issue 8 years ago • 5 comments

Feature request: In addition to the small/long chart sizes, it would be great to have aspect ratios optimized for sharing charts on Twitter and Facebook.

duner avatar Jan 06 '17 20:01 duner

Do you know what those ratio are?

yanofsky avatar Jan 06 '17 22:01 yanofsky

Sorry for not including in the original issue — meant to but then was running to grab lunch. Anyway, per Vox's meme tool (among other sources), Twitter is 2:1 and Facebook is 1.91:1.

duner avatar Jan 06 '17 22:01 duner

If this is a feature y'all would rather not add to the core Chartbuilder tool, we can add it to our fork (and I'd be happy to spend some time figuring out how to implement it) but I figured y'all have a better handle on the codebase and would be better suited to getting something like this done.

duner avatar Jan 06 '17 22:01 duner

@duner I would also look into the cropping margins of those respective platforms, which are different. We've added support for these ARs to our CBs, with optimized margins.

petulla avatar Jan 07 '17 18:01 petulla

I'd be happy to have these sizes in core Chartbuilder

You'd define the sizes in this config: https://github.com/Quartz/Chartbuilder/blob/f0b18d2ac05f55b1231fda37ae3b7fc122f35f94/src/js/config/chart-sizes.js

Then add how they should be styled here: https://github.com/Quartz/Chartbuilder/blob/f0b18d2ac05f55b1231fda37ae3b7fc122f35f94/src/styl/chart-renderer.styl#L168-L237

yanofsky avatar Jan 08 '17 23:01 yanofsky