code: def test_chart_common(pl, chart_f, request):
      # Test the common chart functionalities
      chart = request.getfixturevalue(chart_f)
      title = "Chart title"
      c_red, c_blue = (1.0, 0.0, 0.0, 1.0), (0.0, 0.0, 1.0, 1.0)
      bw = 10
      bs = "--"
  
      # Check scene and renderer properties
      assert chart._scene is None
      assert chart._renderer is None
      pl.add_chart(chart)
      assert chart._scene is pl.renderer._charts._scene
      assert (
          chart._renderer is pl.renderer
          and chart._renderer is pl.renderer._charts._renderer
      )
  
      with pytest.raises((AssertionError, ValueError)):
          chart.size = (-1, 1)
      with pytest.raises((AssertionError, ValueError)):
          chart.loc = (-1, 1)
      chart.size = (0.5, 0.5)
      chart.loc = (0.25, 0.25)
      assert chart.size == (0.5, 0.5)
      assert chart.loc == (0.25, 0.25)
  
      # Check geometry and resizing
      w, h = pl.window_size
      chart._render_event()
      assert chart._geometry == (
          chart.loc[0] * w,
          chart.loc[1] * h,
          chart.size[0] * w,
          chart.size[1] * h,
      )
      w, h = pl.window_size = [200, 200]
      chart._render_event()
      assert chart._geometry == (
          chart.loc[0] * w,
          chart.loc[1] * h,
          chart.size[0] * w,
          chart.size[1] * h,
      )
  
      # Check is_within
      assert chart._is_within(
          (
              (chart.loc[0] + chart.size[0] / 2) * w,
              (chart.loc[1] + chart.size[1] / 2) * h,
          )
      )
      assert not chart._is_within(
          ((chart.loc[0] + chart.size[0] / 2) * w, chart.loc[1] * h - 5)
      )
      assert not chart._is_within(
          (chart.loc[0] * w - 5, (chart.loc[1] + chart.size[1] / 2) * h)
      )
      assert not chart._is_within(
          (chart.loc[0] * w - 5, chart.loc[1] * h - 5)
      )
  
      chart.border_color = c_red
      assert chart.border_color == c_red
      chart.border_width = bw
      assert chart.border_width == bw
      chart.border_style = bs
      assert chart.border_style == bs
      chart.background_color = c_blue
      assert chart.background_color == c_blue
      chart.active_border_color = c_red
      assert chart.active_border_color == c_red
      chart.active_background_color = c_blue
      assert chart.active_background_color == c_blue
  
      # Check remaining properties and methods
      chart.visible = False
      assert not chart.visible
      assert not chart.GetVisible()
      chart.toggle()
      assert chart.visible
      assert chart.GetVisible()
      chart.title = title
      assert chart.title == title
      chart.legend_visible = False
      assert not chart.legend_visible
  
imports: import itertools
  import platform
  import weakref
  import numpy
  import pytest
  from vtkmodules.vtkRenderingContext2D import vtkPen
  import pyvista
  from pyvista import examples
  from pyvista.plotting import charts
  from pyvista.plotting.colors import COLOR_SCHEMES
label_desc: Use image node_id 34 for calling a global function with example usage: test_chart_common(pl, chart_f, request) without return types