Dash - patterns on chart - impact on chart's size (in MB, not in px)

Hi there,
I make use of dash for automatic reporting; every report generated is made of 25 A4 pages, and has a size of circa 3MB.

However, if I start using patterns (instead of shades of colors), and even if it is only on one single page, the PDF generated by the browser becomes extremely large: 45 to 60MB

Is it a known issue caused by the way patterns are implemented ?

My chart consists in 72 traces; there are 3 group of 4 stacked bars per category (Xaxis). If I apply a pattern on group#1 and group#3, the PDF that will be generated by the browser will be super large.

overview (x-axis and y axis truncated):
image

I apologize for reviving my own topic, but these SVG textures really make everything super heavy:
image

Each PDF > 1.5MB has exactly 2 pages out of 26, on which there are some barcharts with texture. It makes textures unusable when printed, and I wonder what impact it has on our dash app memory consumption.

Hey @David22,

You might check that. Just create a dummy app, two empty graphs. Trigger a callback which populates the graphs with figures, one with pattern, on e without. Check the traffic.

I would assume, this is more related to writing the figures into static files, svg, png…

Hello @David22,

It seems this is to be expected, as you have increased the amount of data required to build the block of color representation.

The increase in data required for a pattern compared to a solid color depends on various factors such as the complexity and resolution of the pattern. However, as a rough estimate, a simple pattern might require around 2-10 times more data than a solid color for a 30x30 block. More intricate patterns could require significantly more data.

  • GPT