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

Font size cannot change in my picture #542

Open
dong-8080 opened this issue Nov 1, 2023 · 0 comments
Open

Font size cannot change in my picture #542

dong-8080 opened this issue Nov 1, 2023 · 0 comments

Comments

@dong-8080
Copy link

I'm trying to draw a radar char using pygal. however, I found the way to change font size of labels not work, even I put all font size related attribute. And below paste my code.

import pygal
from IPython.display import Image, SVG
from pygal.style import LightStyle, CleanStyle, Style

custom_style = Style(
    background='transparent',
    plot_background='transparent',
    foreground='black',
    foreground_strong='black',
    foreground_subtle='#630C0D',
    opacity='.3',
    colors=('red', 'green', 'blue', ))

radar_chart = pygal.Radar(width=420, height=400, show_legend=False, fill=True,
                          legend_font_size = 40.0,
                          value_font_size = 40.0,
                          tooltip_font_size = 40.0,
                          major_label_font_size = 40.0,
                          label_font_sioze = 40.0,
                          value_label_font_size = 40.0,
                          margin=5, show_dots=False, style=custom_style, )

radar_chart.title = 'TITLE'
radar_chart.x_labels = ['Richards', 'DeltaBlue', 'Crypto', 'RayTrace', 'EarleyBoyer', 'RegExp', 'Splay', 'NavierStokes']
radar_chart.add('Chrome', [6395, 8212, 7520, 7218, 12464, 1660, 2123, 8607])
radar_chart.add('Firefox', [7473, 8099, 11700, 2651, 6361, 1044, 3797, 9450])
radar_chart.add('Opera', [3472, 2933, 4203, 5229, 5810, 1828, 9013, 4669])
# radar_chart.add('IE', [43, 41, 59, 79, 144, 136, 34, 102])
radar_chart.render_to_png("./image_pygal/radar.png")

Image(filename="./image_pygal/radar.png")

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

1 participant