gov-uk-dashboards 22.1.0__py3-none-any.whl → 23.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,7 @@ class LeafletChoroplethMap:
36
36
  legend_column: str,
37
37
  area_column: str,
38
38
  title: str,
39
- instance: int,
39
+ instance_number: int,
40
40
  subtitle: Optional[str] = None,
41
41
  enable_zoom: bool = True,
42
42
  download_chart_button_id: Optional[str] = None,
@@ -58,7 +58,7 @@ class LeafletChoroplethMap:
58
58
  self.color_scale_is_discrete = color_scale_is_discrete
59
59
  self.show_tile_layer = show_tile_layer
60
60
  self._add_data_to_geojson()
61
- self.instance = instance
61
+ self.instance_number = instance_number
62
62
 
63
63
  def get_leaflet_choropleth_map(self):
64
64
  """Creates and returns leaflet choropleth map chart for display on application.
@@ -78,7 +78,7 @@ class LeafletChoroplethMap:
78
78
  children=[
79
79
  dl.TileLayer() if self.show_tile_layer else None,
80
80
  self._get_colorbar(),
81
- self._get_colorbar_title(),
81
+ self._get_colorbar_title(self.enable_zoom),
82
82
  self._get_dl_geojson(),
83
83
  ],
84
84
  center=[54.5, -2.5], # Centered on the UK
@@ -112,7 +112,7 @@ class LeafletChoroplethMap:
112
112
  self.download_data_button_id,
113
113
  self.download_chart_button_id,
114
114
  None,
115
- self.instance,
115
+ self.instance_number,
116
116
  )
117
117
  download_choropleth_map_display = display_chart_or_table_with_header(
118
118
  download_choropleth_map,
@@ -264,10 +264,10 @@ class LeafletChoroplethMap:
264
264
  tickText=tick_text, # Optional, makes labels look cleaner
265
265
  )
266
266
 
267
- def _get_colorbar_title(self):
267
+ def _get_colorbar_title(self, enable_zoom: bool = False):
268
268
  if self.color_scale_is_discrete:
269
269
  return None
270
- top = "70px" if self.enable_zoom is False else "140px"
270
+ top = "70px" if enable_zoom is False else "140px"
271
271
  return html.Div(
272
272
  self.hover_text_columns[0],
273
273
  style={
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gov_uk_dashboards
3
- Version: 22.1.0
3
+ Version: 23.0.0
4
4
  Summary: Provides access to functionality common to creating a data dashboard.
5
5
  Author: Department for Levelling Up, Housing and Communities
6
6
  Description-Content-Type: text/markdown
@@ -78,7 +78,7 @@ gov_uk_dashboards/components/helpers/get_chart_for_download.py,sha256=I0IH7bE3B8
78
78
  gov_uk_dashboards/components/helpers/plotting_helper_functions.py,sha256=WUif1mlSgWPuTZptBqaElWpJTlitmuiJofMTpOe_Bsg,1833
79
79
  gov_uk_dashboards/components/helpers/update_layout_bgcolor_margin.py,sha256=i7Nwp0CxFpkyQeR8KfOBVMBkzctG7hMpWI2OzgxB2jY,740
80
80
  gov_uk_dashboards/components/leaflet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
- gov_uk_dashboards/components/leaflet/leaflet_choropleth_map.py,sha256=wkBw8x-x8XKuSzzEEW7hAFqh-5keWRardw1u0ZT_vBk,10193
81
+ gov_uk_dashboards/components/leaflet/leaflet_choropleth_map.py,sha256=be3bhK74V_QQGnwyBW4JbjLTIj8hBK_VhQn7gRKWCkY,10259
82
82
  gov_uk_dashboards/components/plotly/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
83
  gov_uk_dashboards/components/plotly/captioned_figure.py,sha256=T0sbtGTiJ79FXxVdPb__hqISuyTc3Dl11cKhgcuW-5U,2804
84
84
  gov_uk_dashboards/components/plotly/choropleth_map.py,sha256=U9RmS3MZGloQAt9HoSYh3Xad205DDfZOjz91ZD_ydbI,9849
@@ -109,8 +109,8 @@ gov_uk_dashboards/lib/datetime_functions/datetime_functions.py,sha256=BQgr8I_vFN
109
109
  gov_uk_dashboards/lib/download_functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
110
110
  gov_uk_dashboards/lib/download_functions/convert_fig_to_image_and_download.py,sha256=-dkYbpTL6txftFfAZW-vfW_O9efb6Dse9WJ9MM6mAqw,534
111
111
  gov_uk_dashboards/lib/download_functions/download_csv_with_headers.py,sha256=aLL3UodmilZA_1bQhtjtKi3FoB-4X_MtLOcDw5e1Nwo,4412
112
- gov_uk_dashboards-22.1.0.dist-info/licenses/LICENSE,sha256=GDiD7Y2Gx7JucPV1JfVySJeah-qiSyBPdpJ6RHCEHTc,1126
113
- gov_uk_dashboards-22.1.0.dist-info/METADATA,sha256=tCyHhM2VlhsZMqArb1FRNkmFQBbML4V0jsH_ZgwLBGo,5917
114
- gov_uk_dashboards-22.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
115
- gov_uk_dashboards-22.1.0.dist-info/top_level.txt,sha256=gPaN1P3-H3Rgi2me6tt-fX_cxo19CZfA4PjlZPjGRpo,18
116
- gov_uk_dashboards-22.1.0.dist-info/RECORD,,
112
+ gov_uk_dashboards-23.0.0.dist-info/licenses/LICENSE,sha256=GDiD7Y2Gx7JucPV1JfVySJeah-qiSyBPdpJ6RHCEHTc,1126
113
+ gov_uk_dashboards-23.0.0.dist-info/METADATA,sha256=EOKOpw3MOC0qCCasMvoUiHGLdNKYoe4pMfDT1Lokk34,5917
114
+ gov_uk_dashboards-23.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
115
+ gov_uk_dashboards-23.0.0.dist-info/top_level.txt,sha256=gPaN1P3-H3Rgi2me6tt-fX_cxo19CZfA4PjlZPjGRpo,18
116
+ gov_uk_dashboards-23.0.0.dist-info/RECORD,,