Skip to content

Commit

Permalink
Merge pull request #63 from eea/develop
Browse files Browse the repository at this point in the history
feat: add filters to plotly visualizations
  • Loading branch information
razvanMiu authored Mar 18, 2024
2 parents 9865621 + 510aea0 commit 4b8c29a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

9.1 - (2024-03-18)
---------------------------
* Change: feat: add filters to plotly visualizations
[razvanMiu]

9.0 - (2024-01-12)
---------------------------
* Change: feat: improve plotlychart visualization serialization
Expand Down
8 changes: 6 additions & 2 deletions eea/api/dataconnector/browser/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ def getVisualization(serializer, layout=True):
return {}

chartData = visualization.get("chartData", {})
use_data_sources = visualization.get("use_data_sources", layout)
provider_url = visualization.get("provider_url", None)
use_data_sources = visualization.get("use_data_sources", layout)
filters = visualization.get("filters", None)
variation = visualization.get("variation", None)

if use_data_sources:
chartData = getVisualizationLayout(chartData)
Expand All @@ -197,7 +199,9 @@ def getVisualization(serializer, layout=True):
"layout": chartData.get("layout", {}),
"frames": chartData.get("frames", [])
},
"use_data_sources": use_data_sources
"use_data_sources": use_data_sources,
"filters": filters,
"variation": variation
}

if use_data_sources and provider_url:
Expand Down
2 changes: 1 addition & 1 deletion eea/api/dataconnector/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.0
10.0

0 comments on commit 4b8c29a

Please sign in to comment.