Skip to content

Commit

Permalink
Added Hotfix for broken map visualization (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdejong authored Aug 14, 2022
1 parent ed30e16 commit 9bc20de
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.3
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.1.4
build-npm:
needs: build-test
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ RUN chown -R nginx:nginx /usr/share/nginx/html/
USER nginx
EXPOSE 5005
HEALTHCHECK cmd curl --fail http://localhost:5005 || exit 1
LABEL version="2.1.3"
LABEL version="2.1.4"
13 changes: 13 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## NeoDash 2.1.3
The 2.1.3 release contains updates to the map visualization, as well as a new Choropleth map report type.
Several usability improvements were also added, including fixing all links into the new documentation pages.

- Extended the map visualization with a heatmap mode & marker clustering.
- Added a Choropleth map visualization report type.
- Added support for auto-linking into a predefined database from https://tools.neo4jlabs.com/.
- Added optional background color setting for reports.
- Added a new 'resize mode' for page layout creation.
- Added support for drawing dates on a time chart (in addition to existing datetime types).
- Fixed broken links in the documentation portal, all in-app links now point to this portal as well.


## NeoDash 2.1.2
The 2.1.2 release contains some bug fixes and minor improvements to the application.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neodash",
"version": "2.1.3",
"version": "2.1.4",
"description": "NeoDash - Neo4j Dashboard Builder",
"neo4jDesktop": {
"apiVersion": "^1.2.0"
Expand Down
13 changes: 13 additions & 0 deletions release-notes.history.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## NeoDash 2.1.3
The 2.1.3 release contains updates to the map visualization, as well as a new Choropleth map report type.
Several usability improvements were also added, including fixing all links into the new documentation pages.

- Extended the map visualization with a heatmap mode & marker clustering.
- Added a Choropleth map visualization report type.
- Added support for auto-linking into a predefined database from https://tools.neo4jlabs.com/.
- Added optional background color setting for reports.
- Added a new 'resize mode' for page layout creation.
- Added support for drawing dates on a time chart (in addition to existing datetime types).
- Fixed broken links in the documentation portal, all in-app links now point to this portal as well.


## NeoDash 2.1.2
The 2.1.2 release contains some bug fixes and minor improvements to the application.

Expand Down
3 changes: 3 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## NeoDash 2.1.4
Added hotfix for missing function in map visualization (https://github.com/neo4j-labs/neodash/issues/183).

## NeoDash 2.1.3
The 2.1.3 release contains updates to the map visualization, as well as a new Choropleth map report type.
Several usability improvements were also added, including fixing all links into the new documentation pages.
Expand Down
30 changes: 16 additions & 14 deletions src/chart/MapChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,7 @@ const NeoMapChart = (props: ChartProps) => {

if (layerType == "markers") {
// Render a node label tooltip
const renderNodeLabel = (node) => {
const selectedProp = props.selection && props.selection[node.firstLabel];
if (selectedProp == "(id)") {
return node.id;
}
if (selectedProp == "(label)") {
return node.labels;
}
if (selectedProp == "(no label)") {
return "";
}
return node.properties[selectedProp] ? node.properties[selectedProp].toString() : "";
}


var markerMarginTop = "6px";
switch (defaultNodeSize) {
case "large":
Expand All @@ -245,6 +232,21 @@ const NeoMapChart = (props: ChartProps) => {
}
}

const renderNodeLabel = (node) => {
const selectedProp = props.selection && props.selection[node.firstLabel];
if (selectedProp == "(id)") {
return node.id;
}
if (selectedProp == "(label)") {
return node.labels;
}
if (selectedProp == "(no label)") {
return "";
}
return node.properties[selectedProp] ? node.properties[selectedProp].toString() : "";
}


function createMarkers() {
// Create markers to plot on the map
let markers = data.nodes.filter(node => node.pos && !isNaN(node.pos[0]) && !isNaN(node.pos[1])).map((node, i) =>
Expand Down
2 changes: 1 addition & 1 deletion src/modal/AboutModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import BugReportIcon from '@material-ui/icons/BugReport';
export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
const app = "NeoDash - Neo4j Dashboard Builder";
const email = "[email protected]";
const version = "2.1.3";
const version = "2.1.4";

const downloadDebugFile = () => {
const element = document.createElement("a");
Expand Down

0 comments on commit 9bc20de

Please sign in to comment.