ghtmtt / DataPlotly

D3 like plots creation with plotly in QGIS
GNU General Public License v2.0
191 stars 50 forks source link

Dataplotly pie chart font size #333

Open Cilaee opened 1 year ago

Cilaee commented 1 year ago

The pie chart generated by Dataplotly in QGIS have font errors. In the project part of QGIS, everything works fine: in the parameters of the Dataplotly window, the "Title and labels customization" option alllow to modify the font (font, style, size, colour, etc.). And the settings are executed correctly on the graph that is then generated.

However, in the QGIS layout section, the font settings (axis titles and legend) don't work: the font is very small and it's impossible to increase the size. This is problematic, because the text is illegible, and in the case of atlases in QGIS, the option of exporting the graphic previously created in the project section and then importing it into the layout section doesn't work.

I'm working with QGIS 3.28

ghtmtt commented 1 year ago

could you please paste a screenshot?

Cilaee commented 1 year ago

Here is an example of a map output

example

According to the comments on the internet it is a general problem for everyone

pedrogeo commented 1 year ago

Same problem in reports in QGIS.

ghtmtt commented 1 year ago

reports and layout have basically the same engine, so if there is a problem in the layouts the same problem, very likely, will be also in the reports.

The main problem of the font size is that the plot is created within an html frame and the font size (and all the other related properties) are different from the QGIS title for example. So it is not so easy to fix this issue.

Gustry commented 8 months ago

Does anyone could find a workaround for increasing the font in a pie chart ?

Is-it not possible to send some extra CSS within the HTML frame, or some some Plotly JSON (doc) ?

ghtmtt commented 8 months ago

not sure if a better output can be obtained with QgsFontButton (see also https://github.com/ghtmtt/DataPlotly/pull/278)