class_docstr: Svg related methods
class_docstr_tok: ["Svg","related","methods"]
code: def gauge_background(
      self,
      serie_node,
      start_angle,
      center,
      radius,
      small_radius,
      end_angle,
      half_pie,
      max_value,
  ):
      if end_angle == 2 * pi:
          end_angle = nearly_2pi
  
      to_shade = [
          coord_abs_project(center, radius, start_angle),
          coord_abs_project(center, radius, end_angle),
          coord_abs_project(center, small_radius, end_angle),
          coord_abs_project(center, small_radius, start_angle),
      ]
  
      self.node(
          serie_node["plot"],
          "path",
          d="M%s A%s 0 1 1 %s L%s A%s 0 1 0 %s z"
          % (
              to_shade[0],
              coord_dual(radius),
              to_shade[1],
              to_shade[2],
              coord_dual(small_radius),
              to_shade[3],
          ),
          class_="gauge-background reactive",
      )
  
      if half_pie:
          begin_end = [
              coord_diff(
                  center,
                  coord_project(
                      radius - (radius - small_radius) / 2, start_angle
                  ),
              ),
              coord_diff(
                  center,
                  coord_project(
                      radius - (radius - small_radius) / 2, end_angle
                  ),
              ),
          ]
          pos = 0
          for i in begin_end:
              self.node(
                  serie_node["plot"],
                  "text",
                  class_="y-{} bound reactive".format(pos),
                  x=i[0],
                  y=i[1] + 10,
                  attrib={"text-anchor": "middle"},
              ).text = "{}".format(0 if pos == 0 else max_value)
              pos += 1
      else:
          middle_radius = 0.5 * (radius + small_radius)
          # Correct text vertical alignment
          middle_radius -= 0.1 * (radius - small_radius)
          to_labels = [
              coord_abs_project(center, middle_radius, 0),
              coord_abs_project(center, middle_radius, nearly_2pi),
          ]
          self.node(
              self.defs,
              "path",
              id="valuePath-%s%s" % center,
              d="M%s A%s 0 1 1 %s"
              % (to_labels[0], coord_dual(middle_radius), to_labels[1]),
          )
          text_ = self.node(serie_node["text_overlay"], "text")
          self.node(
              text_,
              "textPath",
              class_="max-value reactive",
              attrib={
                  "href": "#valuePath-%s%s" % center,
                  "startOffset": "99%",
                  "text-anchor": "end",
              },
          ).text = max_value
  
imports: from __future__ import division
  import io
  import json
  import os
  from datetime import date, datetime
  from math import pi
  from numbers import Number
  from urllib.parse import quote_plus
  from pygal import __version__
  from pygal.etree import etree
  from pygal.util import coord_abs_project, coord_diff, coord_dual, coord_format, coord_project, minify_css, template
label_desc: Use image node_id 9 for calling the Svg obj's underlying member method code with example usage: obj.gauge_background(serie_node, start_angle, center, radius, small_radius, end_angle, half_pie, max_value) without return types