eea.plotly 1.7__tar.gz → 1.9__tar.gz
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.
- {eea_plotly-1.7/eea.plotly.egg-info → eea_plotly-1.9}/PKG-INFO +11 -1
- {eea_plotly-1.7 → eea_plotly-1.9}/docs/HISTORY.txt +10 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/browser/preview_adapter/soer_miniature.py +65 -12
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/io_csv.py +1 -1
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/controlpanel.json +219 -92
- eea_plotly-1.9/eea/plotly/version.txt +1 -0
- {eea_plotly-1.7 → eea_plotly-1.9/eea.plotly.egg-info}/PKG-INFO +11 -1
- eea_plotly-1.7/eea/plotly/version.txt +0 -1
- {eea_plotly-1.7 → eea_plotly-1.9}/CONTRIBUTING.md +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/MANIFEST.in +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/README.rst +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/docs/LICENSE.GPL +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/docs/LICENSE.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/README.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/behaviors.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/browser/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/browser/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/browser/controlpanel.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/browser/preview.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/browser/preview_adapter/adapter.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/browser/pt/visualization_view.pt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/controlpanel.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/deserializer/blocks.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/deserializer/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/deserializer/dxcontent.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/deserializer/dxfields.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/interfaces.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/io_json.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/bg/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/bg/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/cs/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/cs/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/da/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/da/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/de/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/de/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/eea.pot +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/el/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/el/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/en/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/en/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/es/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/es/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/et/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/et/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/eu/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/eu/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/fi/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/fi/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/fr/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/fr/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/hr/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/hr/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/hu/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/hu/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/is/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/is/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/it/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/it/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/kl/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/kl/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/lt/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/lt/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/lv/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/lv/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/mt/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/mt/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/nl/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/nl/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/no/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/no/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/pl/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/pl/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/plone-manual.pot +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/pt/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/pt/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/pt_BR/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/pt_BR/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/ro/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/ro/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/ru/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/ru/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/sk/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/sk/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/sl/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/sl/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/sv/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/sv/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/tr/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/tr/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/update.sh +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/zh_TW/LC_MESSAGES/eea.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/locales/zh_TW/LC_MESSAGES/plone.po +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/permissions.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/browserlayer.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/controlpanel.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/metadata.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/registry.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/rolemap.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/types/visualization.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/default/types.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/uninstall/browserlayer.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/uninstall/controlpanel.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles/uninstall/registry.xml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/profiles.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/controlpanel/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/controlpanel/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/controlpanel/get.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/controlpanel/reset.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/visualization/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/restapi/visualization/get.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/serializer/blocks.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/serializer/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/serializer/dxfields.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/serializer/utils.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/setuphandlers.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/tests/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/tests/base.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/tests/test_doctests.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/upgrades/__init__.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/upgrades/configure.zcml +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea/plotly/utils.py +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea.plotly.egg-info/SOURCES.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea.plotly.egg-info/dependency_links.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea.plotly.egg-info/entry_points.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea.plotly.egg-info/namespace_packages.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea.plotly.egg-info/not-zip-safe +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea.plotly.egg-info/requires.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/eea.plotly.egg-info/top_level.txt +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/setup.cfg +0 -0
- {eea_plotly-1.7 → eea_plotly-1.9}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eea.plotly
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9
|
|
4
4
|
Summary: volto-plotlycharts backend support
|
|
5
5
|
Home-page: https://github.com/eea/eea.plotly
|
|
6
6
|
Author: European Environment Agency: IDM2 A-Team
|
|
@@ -145,6 +145,16 @@ EEA_ - European Environment Agency (EU)
|
|
|
145
145
|
Changelog
|
|
146
146
|
=========
|
|
147
147
|
|
|
148
|
+
1.9 - (2025-08-20)
|
|
149
|
+
---------------------------
|
|
150
|
+
* Change: Limit delimiters to specific characters
|
|
151
|
+
[razvanMiu]
|
|
152
|
+
|
|
153
|
+
1.8 - (2025-08-20)
|
|
154
|
+
---------------------------
|
|
155
|
+
* Change: fix 'no data provided' soer indicator
|
|
156
|
+
[razvanMiu]
|
|
157
|
+
|
|
148
158
|
1.7 - (2025-07-06)
|
|
149
159
|
---------------------------
|
|
150
160
|
* Change: soer_miniature improved logic
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
1.9 - (2025-08-20)
|
|
5
|
+
---------------------------
|
|
6
|
+
* Change: Limit delimiters to specific characters
|
|
7
|
+
[razvanMiu]
|
|
8
|
+
|
|
9
|
+
1.8 - (2025-08-20)
|
|
10
|
+
---------------------------
|
|
11
|
+
* Change: fix 'no data provided' soer indicator
|
|
12
|
+
[razvanMiu]
|
|
13
|
+
|
|
4
14
|
1.7 - (2025-07-06)
|
|
5
15
|
---------------------------
|
|
6
16
|
* Change: soer_miniature improved logic
|
|
@@ -35,14 +35,22 @@ def exact_step(vmin, vmax, target_ticks=5):
|
|
|
35
35
|
return abs(vmax - vmin) / (target_ticks - 1)
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
def toFloat(v):
|
|
39
|
+
""" Convert value to float """
|
|
40
|
+
try:
|
|
41
|
+
return float(v)
|
|
42
|
+
except ValueError:
|
|
43
|
+
return 0
|
|
44
|
+
|
|
45
|
+
|
|
38
46
|
def getMin(arr):
|
|
39
47
|
""" Get minimum value from array """
|
|
40
|
-
return min(
|
|
48
|
+
return min(toFloat(v) for v in arr if v is not None)
|
|
41
49
|
|
|
42
50
|
|
|
43
51
|
def getMax(arr):
|
|
44
52
|
""" Get maximum value from array """
|
|
45
|
-
return max(
|
|
53
|
+
return max(toFloat(v) for v in arr if v is not None)
|
|
46
54
|
|
|
47
55
|
|
|
48
56
|
def serialize(context):
|
|
@@ -53,28 +61,73 @@ def serialize(context):
|
|
|
53
61
|
data = context.visualization["data"]
|
|
54
62
|
layout = context.visualization["layout"]
|
|
55
63
|
|
|
64
|
+
top = (
|
|
65
|
+
layout.get("margin", {}).get("t") or
|
|
66
|
+
layout.get("template", {}).get("margin", {}).get("t")
|
|
67
|
+
) or 0
|
|
68
|
+
nticks = max(int((context.height - top) / 100), 2)
|
|
69
|
+
|
|
56
70
|
if len(data) < SOER_TRACES_COUNT:
|
|
57
71
|
layout["xaxis"]["showticklabels"] = False
|
|
72
|
+
layout["xaxis"]["showgrid"] = False
|
|
73
|
+
layout["xaxis"]["autorange"] = False
|
|
74
|
+
layout["xaxis"]["range"] = [0, 1]
|
|
75
|
+
layout["xaxis"]["tickmode"] = "auto"
|
|
76
|
+
layout["xaxis"]["gridwidth"] = 4
|
|
77
|
+
|
|
78
|
+
layout["yaxis"]["showticklabels"] = False
|
|
79
|
+
layout["yaxis"]["showgrid"] = True
|
|
80
|
+
layout["yaxis"]["autorange"] = False
|
|
81
|
+
layout["yaxis"]["range"] = [0, nticks]
|
|
82
|
+
layout["yaxis"]["tickmode"] = "linear"
|
|
83
|
+
layout["yaxis"]["automargin"] = True
|
|
84
|
+
layout["yaxis"]["gridwidth"] = 4
|
|
85
|
+
|
|
86
|
+
del layout["template"]["layout"]["annotationdefaults"]
|
|
87
|
+
del layout["template"]["layout"]["yaxis"]["rangemode"]
|
|
88
|
+
|
|
89
|
+
layout["template"]["layout"]["annotationdefaults"] = {
|
|
90
|
+
"showarrow": False,
|
|
91
|
+
"xref": "paper",
|
|
92
|
+
"yref": "paper"
|
|
93
|
+
}
|
|
58
94
|
return False
|
|
59
95
|
|
|
60
|
-
min_year =
|
|
61
|
-
max_year =
|
|
96
|
+
min_year = toFloat("inf")
|
|
97
|
+
max_year = toFloat("-inf")
|
|
62
98
|
first_val = None
|
|
63
99
|
new_x = []
|
|
64
100
|
new_y = []
|
|
65
101
|
new_text = []
|
|
102
|
+
dotted_trace = None
|
|
103
|
+
|
|
104
|
+
# Custom dotted trace
|
|
105
|
+
trace_6 = None
|
|
106
|
+
if len(data) > 5:
|
|
107
|
+
trace_6 = data[5]
|
|
108
|
+
|
|
109
|
+
if trace_6 and trace_6.get("id") == "country_trend_dotted":
|
|
110
|
+
trace_6["mode"] = "lines"
|
|
111
|
+
dotted_trace = trace_6
|
|
112
|
+
elif trace_6:
|
|
113
|
+
trace_6["visible"] = False
|
|
114
|
+
trace_6["x"] = None
|
|
115
|
+
trace_6["y"] = None
|
|
66
116
|
|
|
67
117
|
if data[0].get("x") is not None and data[0].get("y") is not None:
|
|
68
118
|
x_len = len(data[0].get("x") or [])
|
|
69
119
|
y_len = len(data[0].get("y") or [])
|
|
70
120
|
text_len = len(data[0].get("text") or [])
|
|
71
121
|
|
|
122
|
+
if y_len < x_len:
|
|
123
|
+
data[0]["y"] = data[0]["y"] + [None] * (x_len - y_len)
|
|
124
|
+
|
|
72
125
|
for index, val in enumerate(data[0]["y"]):
|
|
73
126
|
if val and not first_val:
|
|
74
127
|
first_val = val
|
|
75
128
|
if not first_val:
|
|
76
129
|
continue
|
|
77
|
-
year = data[0]["x"][index] if index < x_len else None
|
|
130
|
+
year = toFloat(data[0]["x"][index]) if index < x_len else None
|
|
78
131
|
text = data[0]["text"][index] if index < text_len else None
|
|
79
132
|
new_x.append(year)
|
|
80
133
|
new_y.append(val)
|
|
@@ -84,6 +137,11 @@ def serialize(context):
|
|
|
84
137
|
if val and year < min_year:
|
|
85
138
|
min_year = year
|
|
86
139
|
|
|
140
|
+
if dotted_trace:
|
|
141
|
+
first_year = toFloat(dotted_trace["x"][0])
|
|
142
|
+
if first_year < min_year:
|
|
143
|
+
min_year = first_year
|
|
144
|
+
|
|
87
145
|
data[0]["x"] = new_x
|
|
88
146
|
data[0]["y"] = new_y
|
|
89
147
|
data[0]["text"] = new_text
|
|
@@ -117,22 +175,17 @@ def serialize(context):
|
|
|
117
175
|
y_values = (
|
|
118
176
|
(data[0].get("y") or []) +
|
|
119
177
|
(data[1].get("y") or []) +
|
|
120
|
-
(data[4].get("y") or [])
|
|
178
|
+
(data[4].get("y") or []) +
|
|
179
|
+
((trace_6.get("y") or []) if trace_6 else [])
|
|
121
180
|
)
|
|
122
181
|
|
|
123
182
|
if y_values:
|
|
124
|
-
top = (
|
|
125
|
-
layout.get("margin", {}).get("t") or
|
|
126
|
-
layout.get("template", {}).get("margin", {}).get("t")
|
|
127
|
-
) or 0
|
|
128
183
|
min_y = getMin(y_values)
|
|
129
184
|
max_y = getMax(y_values)
|
|
130
185
|
|
|
131
186
|
min_y = min_y if min_y < 0 else 0
|
|
132
187
|
max_y = max_y if max_y > 0 else 0
|
|
133
188
|
|
|
134
|
-
nticks = max(int((context.height - top) / 100), 2)
|
|
135
|
-
|
|
136
189
|
step = exact_step(min_y, max_y, nticks)
|
|
137
190
|
|
|
138
191
|
layout["yaxis"]["tickmode"] = "linear"
|
|
@@ -34,7 +34,7 @@ class CsvReader:
|
|
|
34
34
|
inputEntity = args[0] or kwrds.get('csvfile')
|
|
35
35
|
sample = inputEntity.read(1024)
|
|
36
36
|
inputEntity.seek(0)
|
|
37
|
-
dialect = csv.Sniffer().sniff(sample)
|
|
37
|
+
dialect = csv.Sniffer().sniff(sample, delimiters=',;\t|')
|
|
38
38
|
except (csv.Error, TypeError):
|
|
39
39
|
# No dialect found, use default
|
|
40
40
|
dialect = csv.excel
|