eea.plotly 1.7__tar.gz → 1.8__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.
Files changed (137) hide show
  1. {eea_plotly-1.7/eea.plotly.egg-info → eea_plotly-1.8}/PKG-INFO +6 -1
  2. {eea_plotly-1.7 → eea_plotly-1.8}/docs/HISTORY.txt +5 -0
  3. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/browser/preview_adapter/soer_miniature.py +65 -12
  4. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/controlpanel.json +219 -92
  5. eea_plotly-1.8/eea/plotly/version.txt +1 -0
  6. {eea_plotly-1.7 → eea_plotly-1.8/eea.plotly.egg-info}/PKG-INFO +6 -1
  7. eea_plotly-1.7/eea/plotly/version.txt +0 -1
  8. {eea_plotly-1.7 → eea_plotly-1.8}/CONTRIBUTING.md +0 -0
  9. {eea_plotly-1.7 → eea_plotly-1.8}/MANIFEST.in +0 -0
  10. {eea_plotly-1.7 → eea_plotly-1.8}/README.rst +0 -0
  11. {eea_plotly-1.7 → eea_plotly-1.8}/docs/LICENSE.GPL +0 -0
  12. {eea_plotly-1.7 → eea_plotly-1.8}/docs/LICENSE.txt +0 -0
  13. {eea_plotly-1.7 → eea_plotly-1.8}/eea/__init__.py +0 -0
  14. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/README.txt +0 -0
  15. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/__init__.py +0 -0
  16. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/behaviors.py +0 -0
  17. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/browser/__init__.py +0 -0
  18. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/browser/configure.zcml +0 -0
  19. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/browser/controlpanel.py +0 -0
  20. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/browser/preview.py +0 -0
  21. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/browser/preview_adapter/adapter.py +0 -0
  22. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/browser/pt/visualization_view.pt +0 -0
  23. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/configure.zcml +0 -0
  24. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/controlpanel.py +0 -0
  25. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/deserializer/blocks.py +0 -0
  26. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/deserializer/configure.zcml +0 -0
  27. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/deserializer/dxcontent.py +0 -0
  28. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/deserializer/dxfields.py +0 -0
  29. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/interfaces.py +0 -0
  30. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/io_csv.py +0 -0
  31. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/io_json.py +0 -0
  32. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/__init__.py +0 -0
  33. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/bg/LC_MESSAGES/eea.po +0 -0
  34. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/bg/LC_MESSAGES/plone.po +0 -0
  35. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/cs/LC_MESSAGES/eea.po +0 -0
  36. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/cs/LC_MESSAGES/plone.po +0 -0
  37. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/da/LC_MESSAGES/eea.po +0 -0
  38. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/da/LC_MESSAGES/plone.po +0 -0
  39. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/de/LC_MESSAGES/eea.po +0 -0
  40. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/de/LC_MESSAGES/plone.po +0 -0
  41. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/eea.pot +0 -0
  42. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/el/LC_MESSAGES/eea.po +0 -0
  43. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/el/LC_MESSAGES/plone.po +0 -0
  44. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/en/LC_MESSAGES/eea.po +0 -0
  45. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/en/LC_MESSAGES/plone.po +0 -0
  46. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/es/LC_MESSAGES/eea.po +0 -0
  47. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/es/LC_MESSAGES/plone.po +0 -0
  48. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/et/LC_MESSAGES/eea.po +0 -0
  49. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/et/LC_MESSAGES/plone.po +0 -0
  50. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/eu/LC_MESSAGES/eea.po +0 -0
  51. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/eu/LC_MESSAGES/plone.po +0 -0
  52. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/fi/LC_MESSAGES/eea.po +0 -0
  53. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/fi/LC_MESSAGES/plone.po +0 -0
  54. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/fr/LC_MESSAGES/eea.po +0 -0
  55. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/fr/LC_MESSAGES/plone.po +0 -0
  56. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/hr/LC_MESSAGES/eea.po +0 -0
  57. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/hr/LC_MESSAGES/plone.po +0 -0
  58. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/hu/LC_MESSAGES/eea.po +0 -0
  59. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/hu/LC_MESSAGES/plone.po +0 -0
  60. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/is/LC_MESSAGES/eea.po +0 -0
  61. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/is/LC_MESSAGES/plone.po +0 -0
  62. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/it/LC_MESSAGES/eea.po +0 -0
  63. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/it/LC_MESSAGES/plone.po +0 -0
  64. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/kl/LC_MESSAGES/eea.po +0 -0
  65. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/kl/LC_MESSAGES/plone.po +0 -0
  66. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/lt/LC_MESSAGES/eea.po +0 -0
  67. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/lt/LC_MESSAGES/plone.po +0 -0
  68. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/lv/LC_MESSAGES/eea.po +0 -0
  69. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/lv/LC_MESSAGES/plone.po +0 -0
  70. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/mt/LC_MESSAGES/eea.po +0 -0
  71. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/mt/LC_MESSAGES/plone.po +0 -0
  72. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/nl/LC_MESSAGES/eea.po +0 -0
  73. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/nl/LC_MESSAGES/plone.po +0 -0
  74. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/no/LC_MESSAGES/eea.po +0 -0
  75. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/no/LC_MESSAGES/plone.po +0 -0
  76. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/pl/LC_MESSAGES/eea.po +0 -0
  77. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/pl/LC_MESSAGES/plone.po +0 -0
  78. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/plone-manual.pot +0 -0
  79. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/pt/LC_MESSAGES/eea.po +0 -0
  80. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/pt/LC_MESSAGES/plone.po +0 -0
  81. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/pt_BR/LC_MESSAGES/eea.po +0 -0
  82. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/pt_BR/LC_MESSAGES/plone.po +0 -0
  83. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/ro/LC_MESSAGES/eea.po +0 -0
  84. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/ro/LC_MESSAGES/plone.po +0 -0
  85. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/ru/LC_MESSAGES/eea.po +0 -0
  86. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/ru/LC_MESSAGES/plone.po +0 -0
  87. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/sk/LC_MESSAGES/eea.po +0 -0
  88. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/sk/LC_MESSAGES/plone.po +0 -0
  89. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/sl/LC_MESSAGES/eea.po +0 -0
  90. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/sl/LC_MESSAGES/plone.po +0 -0
  91. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/sv/LC_MESSAGES/eea.po +0 -0
  92. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/sv/LC_MESSAGES/plone.po +0 -0
  93. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/tr/LC_MESSAGES/eea.po +0 -0
  94. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/tr/LC_MESSAGES/plone.po +0 -0
  95. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/update.sh +0 -0
  96. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/zh_TW/LC_MESSAGES/eea.po +0 -0
  97. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/locales/zh_TW/LC_MESSAGES/plone.po +0 -0
  98. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/permissions.zcml +0 -0
  99. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/browserlayer.xml +0 -0
  100. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/controlpanel.xml +0 -0
  101. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/metadata.xml +0 -0
  102. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/registry.xml +0 -0
  103. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/rolemap.xml +0 -0
  104. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/types/visualization.xml +0 -0
  105. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/default/types.xml +0 -0
  106. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/uninstall/browserlayer.xml +0 -0
  107. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/uninstall/controlpanel.xml +0 -0
  108. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles/uninstall/registry.xml +0 -0
  109. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/profiles.zcml +0 -0
  110. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/__init__.py +0 -0
  111. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/configure.zcml +0 -0
  112. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/controlpanel/__init__.py +0 -0
  113. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/controlpanel/configure.zcml +0 -0
  114. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/controlpanel/get.py +0 -0
  115. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/controlpanel/reset.py +0 -0
  116. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/visualization/configure.zcml +0 -0
  117. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/restapi/visualization/get.py +0 -0
  118. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/serializer/blocks.py +0 -0
  119. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/serializer/configure.zcml +0 -0
  120. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/serializer/dxfields.py +0 -0
  121. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/serializer/utils.py +0 -0
  122. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/setuphandlers.py +0 -0
  123. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/tests/__init__.py +0 -0
  124. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/tests/base.py +0 -0
  125. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/tests/test_doctests.py +0 -0
  126. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/upgrades/__init__.py +0 -0
  127. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/upgrades/configure.zcml +0 -0
  128. {eea_plotly-1.7 → eea_plotly-1.8}/eea/plotly/utils.py +0 -0
  129. {eea_plotly-1.7 → eea_plotly-1.8}/eea.plotly.egg-info/SOURCES.txt +0 -0
  130. {eea_plotly-1.7 → eea_plotly-1.8}/eea.plotly.egg-info/dependency_links.txt +0 -0
  131. {eea_plotly-1.7 → eea_plotly-1.8}/eea.plotly.egg-info/entry_points.txt +0 -0
  132. {eea_plotly-1.7 → eea_plotly-1.8}/eea.plotly.egg-info/namespace_packages.txt +0 -0
  133. {eea_plotly-1.7 → eea_plotly-1.8}/eea.plotly.egg-info/not-zip-safe +0 -0
  134. {eea_plotly-1.7 → eea_plotly-1.8}/eea.plotly.egg-info/requires.txt +0 -0
  135. {eea_plotly-1.7 → eea_plotly-1.8}/eea.plotly.egg-info/top_level.txt +0 -0
  136. {eea_plotly-1.7 → eea_plotly-1.8}/setup.cfg +0 -0
  137. {eea_plotly-1.7 → eea_plotly-1.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eea.plotly
3
- Version: 1.7
3
+ Version: 1.8
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,11 @@ EEA_ - European Environment Agency (EU)
145
145
  Changelog
146
146
  =========
147
147
 
148
+ 1.8 - (2025-08-20)
149
+ ---------------------------
150
+ * Change: fix 'no data provided' soer indicator
151
+ [razvanMiu]
152
+
148
153
  1.7 - (2025-07-06)
149
154
  ---------------------------
150
155
  * Change: soer_miniature improved logic
@@ -1,6 +1,11 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.8 - (2025-08-20)
5
+ ---------------------------
6
+ * Change: fix 'no data provided' soer indicator
7
+ [razvanMiu]
8
+
4
9
  1.7 - (2025-07-06)
5
10
  ---------------------------
6
11
  * 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(float(v) for v in arr if v is not None)
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(float(v) for v in arr if v is not None)
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 = float("inf")
61
- max_year = float("-inf")
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"