2

I'm following the pygal docs and using the following snippet to generate a SolidGauge Half chart:

http://www.pygal.org/en/stable/documentation/types/solidgauge.html#half

import pygal
gauge = pygal.SolidGauge(
        half_pie=True,
        inner_radius=0.70,
        show_legend=False,
)
gauge.add('', [{'value': 79, 'max_value': 100, 'color': 'red', }])
gauge.render_in_browser()

enter image description here

I've been playing around with the Config options, but I can't find a way to remove the text from the chart (i.e. the 0, 79, and 100 values).

Is there a way to do this?

atm
  • 1,684
  • 1
  • 22
  • 24

1 Answers1

0

You can mess around with the font size and foreground color with custom style. Or the (print_values=False), should remove the "79" but not the "0" or "100". I would highly recommend the former. Dont mind some of the extra Config modules like (margin=20) or (explicit_size=True) I just wanted to shrink the gauge chart. sample image

4b0
  • 21,981
  • 30
  • 95
  • 142
  • 1
    Welcome to Stack Overflow! Please [edit] your post to add code and data as text ([using code formatting](https://stackoverflow.com/editing-help#code)), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and [many more reasons](https://meta.stackoverflow.com/a/285557). Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data. See [mcve] on what code is required. – Adriaan Sep 16 '22 at 05:42