gov-uk-dashboards 15.0.1__py3-none-any.whl → 15.0.2__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.
- gov_uk_dashboards/components/plotly/choropleth_map.py +20 -1
- {gov_uk_dashboards-15.0.1.dist-info → gov_uk_dashboards-15.0.2.dist-info}/METADATA +1 -1
- {gov_uk_dashboards-15.0.1.dist-info → gov_uk_dashboards-15.0.2.dist-info}/RECORD +6 -6
- {gov_uk_dashboards-15.0.1.dist-info → gov_uk_dashboards-15.0.2.dist-info}/WHEEL +0 -0
- {gov_uk_dashboards-15.0.1.dist-info → gov_uk_dashboards-15.0.2.dist-info}/licenses/LICENSE +0 -0
- {gov_uk_dashboards-15.0.1.dist-info → gov_uk_dashboards-15.0.2.dist-info}/top_level.txt +0 -0
@@ -210,12 +210,31 @@ class ChoroplethMap:
|
|
210
210
|
},
|
211
211
|
)
|
212
212
|
|
213
|
+
def _wrap_text(self, text, max_chars_per_line):
|
214
|
+
words = text.split()
|
215
|
+
lines = []
|
216
|
+
current_line = ""
|
217
|
+
|
218
|
+
for word in words:
|
219
|
+
if len(current_line) + len(word) + 1 > max_chars_per_line:
|
220
|
+
lines.append(current_line)
|
221
|
+
current_line = word
|
222
|
+
else:
|
223
|
+
if current_line:
|
224
|
+
current_line += " "
|
225
|
+
current_line += word
|
226
|
+
|
227
|
+
if current_line:
|
228
|
+
lines.append(current_line)
|
229
|
+
|
230
|
+
return "<br>".join(lines)
|
231
|
+
|
213
232
|
def _get_color_bar(self):
|
214
233
|
if self.discrete_map:
|
215
234
|
return None
|
216
235
|
|
217
236
|
return {
|
218
|
-
"title": self.
|
237
|
+
"title": self._wrap_text(self.legend_title_text, 10),
|
219
238
|
"thickness": 20,
|
220
239
|
"len": 0.8,
|
221
240
|
"x": 0.9,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: gov_uk_dashboards
|
3
|
-
Version: 15.0.
|
3
|
+
Version: 15.0.2
|
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
|
@@ -75,7 +75,7 @@ gov_uk_dashboards/components/helpers/plotting_helper_functions.py,sha256=ZyO0hYc
|
|
75
75
|
gov_uk_dashboards/components/helpers/update_layout_bgcolor_margin.py,sha256=i7Nwp0CxFpkyQeR8KfOBVMBkzctG7hMpWI2OzgxB2jY,740
|
76
76
|
gov_uk_dashboards/components/plotly/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
77
|
gov_uk_dashboards/components/plotly/captioned_figure.py,sha256=T0sbtGTiJ79FXxVdPb__hqISuyTc3Dl11cKhgcuW-5U,2804
|
78
|
-
gov_uk_dashboards/components/plotly/choropleth_map.py,sha256=
|
78
|
+
gov_uk_dashboards/components/plotly/choropleth_map.py,sha256=U9RmS3MZGloQAt9HoSYh3Xad205DDfZOjz91ZD_ydbI,9849
|
79
79
|
gov_uk_dashboards/components/plotly/enums.py,sha256=0QnVyXwnBQRqP3p8YIgPsvGLPu-wClBj9F_722GDfYU,794
|
80
80
|
gov_uk_dashboards/components/plotly/stacked_barchart.py,sha256=y2XOf96tMfy5ythPb5RzqW5qGc2sKU3W508UbWO2iC0,12175
|
81
81
|
gov_uk_dashboards/components/plotly/time_series_chart.py,sha256=oOxGjCjoKclLc5o9qGc6vMtb1LXWZ2WbdZzQ31NLZ9E,18176
|
@@ -99,8 +99,8 @@ gov_uk_dashboards/lib/dap/dap_deployment.py,sha256=ZXixeOAtRNjMsPdGKLwwLNamlo0mi
|
|
99
99
|
gov_uk_dashboards/lib/dap/get_dataframe_from_cds.py,sha256=OiusRCgYnkBjK_GZgYLGzNrxOGizYt8CgThiWRCVKK0,3921
|
100
100
|
gov_uk_dashboards/lib/datetime_functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
101
101
|
gov_uk_dashboards/lib/datetime_functions/datetime_functions.py,sha256=BQgr8I_vFNYwLi-fE4YC6jZ5PpbPea2rnD_2a_lw0YE,12209
|
102
|
-
gov_uk_dashboards-15.0.
|
103
|
-
gov_uk_dashboards-15.0.
|
104
|
-
gov_uk_dashboards-15.0.
|
105
|
-
gov_uk_dashboards-15.0.
|
106
|
-
gov_uk_dashboards-15.0.
|
102
|
+
gov_uk_dashboards-15.0.2.dist-info/licenses/LICENSE,sha256=GDiD7Y2Gx7JucPV1JfVySJeah-qiSyBPdpJ6RHCEHTc,1126
|
103
|
+
gov_uk_dashboards-15.0.2.dist-info/METADATA,sha256=vnBnaJwv-t8MIGRQvARA2SNDOXHlgMQSqtTUEK77fdY,5917
|
104
|
+
gov_uk_dashboards-15.0.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
105
|
+
gov_uk_dashboards-15.0.2.dist-info/top_level.txt,sha256=gPaN1P3-H3Rgi2me6tt-fX_cxo19CZfA4PjlZPjGRpo,18
|
106
|
+
gov_uk_dashboards-15.0.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|