Skip to content

Commit f6d5ecb

Browse files
authored
Stability fixes for 2.0.11 (#76)
Fix for rendering dictionaries in tables/single value charts. Added resize handler for fullscreen map views. Added missing auto-run config to pie charts. Fixed broken value scale parameter for bar charts.
1 parent d62337b commit f6d5ecb

20 files changed

+52
-131
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neodash",
3-
"version": "2.0.10",
3+
"version": "2.0.11",
44
"description": "NeoDash - Neo4j Dashboard Builder",
55
"neo4jDesktop": {
66
"apiVersion": "^1.2.0"

release-notes.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
## NeoDash 2.0.8 / 2.0.9 / 2.0.10
2-
Fixed to supplement 2.0.7:
1+
## NeoDash 2.0.8 / 2.0.9 / 2.0.10 / 2.0.11
2+
Stability fixes to supplement 2.0.7:
33
- Hotfix for missing config file in Neo4j Desktop causing startup issue.
44
- Hotfix for application crashes caused by rendering custom data types in transposed table views.
55
- Hotfix for object rendering in tables & line-chart type detection.
6+
- Fix for rendering dictionaries in tables/single value charts.
7+
- Added resize handler for fullscreen map views.
8+
- Added missing auto-run config to pie charts.
9+
- Fixed broken value scale parameter for bar charts.
610

711
## NeoDash 2.0.7
812
Application functionality:

src/chart/MapChart.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const update = (state, mutations) =>
1919
* Renders Neo4j records as their JSON representation.
2020
*/
2121
const NeoMapChart = (props: ChartProps) => {
22-
const records = props.records;
2322

2423
// Retrieve config from advanced settings
2524
const nodeColorProp = props.settings && props.settings.nodeColorProp ? props.settings.nodeColorProp : "color";
@@ -37,6 +36,11 @@ const NeoMapChart = (props: ChartProps) => {
3736
const widthScale = 8.55;
3837
const heightScale = 6.7;
3938

39+
var key = data.centerLatitude + "," + data.centerLongitude + "," + props.fullscreen;
40+
useEffect(() => {
41+
data.centerLatitude + "," + data.centerLongitude + "," + props.fullscreen;
42+
}, [props.fullscreen])
43+
4044
useEffect(() => {
4145
buildVisualizationDictionaryFromRecords(props.records);
4246
}, [])
@@ -130,7 +134,7 @@ const NeoMapChart = (props: ChartProps) => {
130134
extractGraphEntitiesFromField(field);
131135
})
132136
});
133-
137+
134138
// Assign proper colors & coordinates to nodes.
135139
const totalColors = categoricalColorSchemes[nodeColorScheme].length;
136140
const nodeLabelsList = Object.keys(nodeLabels);
@@ -161,7 +165,7 @@ const NeoMapChart = (props: ChartProps) => {
161165
return update(node, { pos: node.pos ? node.pos : assignedPos, color: assignedColor ? assignedColor : defaultNodeColor });
162166

163167
});
164-
168+
165169
// Assign proper curvatures to relationships.
166170
const linksList = Object.values(links).map(nodePair => {
167171
return nodePair.map((link, i) => {
@@ -299,7 +303,7 @@ const NeoMapChart = (props: ChartProps) => {
299303
const fullscreen = props.fullscreen ? props.fullscreen : true;
300304

301305
// Draw the component.
302-
return <MapContainer /*ref={observe}*/ key={data.centerLatitude + "," + data.centerLongitude + "," + fullscreen} style={{ width: "100%", height: "100%" }}
306+
return <MapContainer /*ref={observe}*/ key={key} style={{ width: "100%", height: "100%" }}
303307
center={[data.centerLatitude ? data.centerLatitude : 0, data.centerLongitude ? data.centerLongitude : 0]}
304308
zoom={data.zoom ? data.zoom : 0}
305309
maxZoom={18}

src/chart/ParameterSelectionChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const NeoParameterSelectionChart = (props: ChartProps) => {
8383
inputValue={inputText}
8484
onInputChange={(event, value) => {
8585
setInputText("" + value);
86-
debouncedQueryCallback(query, { input: value }, setExtraRecords);
86+
debouncedQueryCallback(query, { input: ""+value }, setExtraRecords);
8787
}}
8888
getOptionSelected={(option, value) => (option && option.toString()) === (value && value.toString())}
8989
value={value ? value.toString() : "" + currentValue}

src/chart/visualizations/BarVisualization.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ export default function BarVisualization(props: ExtendedChartReportProps) {
6969
keys={keys}
7070
indexBy="index"
7171
margin={{ top: marginTop, right: (legend) ? legendWidth + marginRight : marginRight, bottom: marginBottom, left: marginLeft }}
72+
valueScale={{ type: valueScale }}
7273
padding={0.3}
73-
// valueScale={{ type: valueScale }}
7474
minValue={minValue}
7575
maxValue={maxValue}
7676
colors={{ scheme: colorScheme }}

src/config/ReportConfig.tsx

Lines changed: 6 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -307,108 +307,6 @@ export const REPORT_TYPES = {
307307
}
308308
}
309309
},
310-
"pie": {
311-
label: "Pie Chart",
312-
component: NeoPieChart,
313-
helperText: <div>A pie chart expects two fields: a <code>category</code> and a <code>value</code>.</div>,
314-
selection: {
315-
"index": {
316-
label: "Category",
317-
type: SELECTION_TYPES.TEXT
318-
},
319-
"value": {
320-
label: "Value",
321-
type: SELECTION_TYPES.NUMBER,
322-
key: true
323-
},
324-
"key": {
325-
label: "Group",
326-
type: SELECTION_TYPES.TEXT,
327-
optional: true
328-
}
329-
},
330-
useRecordMapper: true,
331-
maxRecords: 100,
332-
settings: {
333-
"sortByValue": {
334-
label: "Auto-sort slices by value",
335-
type: SELECTION_TYPES.LIST,
336-
values: [true, false],
337-
default: false
338-
},
339-
"enableArcLabels": {
340-
label: "Show Values in slices",
341-
type: SELECTION_TYPES.LIST,
342-
values: [true, false],
343-
default: true
344-
},
345-
"enableArcLinkLabels": {
346-
label: "Show categories next to slices",
347-
type: SELECTION_TYPES.LIST,
348-
values: [true, false],
349-
default: true
350-
},
351-
"legend": {
352-
label: "Show legend under visualization",
353-
type: SELECTION_TYPES.LIST,
354-
values: [true, false],
355-
default: false
356-
},
357-
"interactive": {
358-
label: "Enable interactivity",
359-
type: SELECTION_TYPES.LIST,
360-
values: [true, false],
361-
default: true
362-
},
363-
"colors": {
364-
label: "Color Scheme",
365-
type: SELECTION_TYPES.LIST,
366-
values: ["nivo", "category10", "accent", "dark2", "paired", "pastel1", "pastel2", "set1", "set2", "set3"],
367-
default: "set2"
368-
},
369-
"innerRadius": {
370-
label: "Pie Inner Radius (between 0 and 1)",
371-
type: SELECTION_TYPES.NUMBER,
372-
default: 0
373-
},
374-
"padAngle": {
375-
label: "Slice padding angle (degrees)",
376-
type: SELECTION_TYPES.NUMBER,
377-
default: 0
378-
},
379-
"borderWidth": {
380-
label: "Slice border width (px)",
381-
type: SELECTION_TYPES.NUMBER,
382-
default: 0
383-
},
384-
"marginLeft": {
385-
label: "Margin Left (px)",
386-
type: SELECTION_TYPES.NUMBER,
387-
default: 24
388-
},
389-
"marginRight": {
390-
label: "Margin Right (px)",
391-
type: SELECTION_TYPES.NUMBER,
392-
default: 24
393-
},
394-
"marginTop": {
395-
label: "Margin Top (px)",
396-
type: SELECTION_TYPES.NUMBER,
397-
default: 24
398-
},
399-
"marginBottom": {
400-
label: "Margin Bottom (px)",
401-
type: SELECTION_TYPES.NUMBER,
402-
default: 40
403-
},
404-
"autorun": {
405-
label: "Auto-run query",
406-
type: SELECTION_TYPES.LIST,
407-
values: [true, false],
408-
default: true
409-
}
410-
}
411-
},
412310
"pie": {
413311
label: "Pie Chart",
414312
component: NeoPieChart,
@@ -502,6 +400,12 @@ export const REPORT_TYPES = {
502400
label: "Margin Bottom (px)",
503401
type: SELECTION_TYPES.NUMBER,
504402
default: 40
403+
},
404+
"autorun": {
405+
label: "Auto-run query",
406+
type: SELECTION_TYPES.LIST,
407+
values: [true, false],
408+
default: true
505409
}
506410
}
507411
},

src/dashboard/DashboardDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const NeoDrawer = ({ open, hidden, connection, dashboardSettings, updateD
4646
width: "56px"
4747
}
4848
}
49-
open={open}
49+
open={open == true}
5050
>
5151
<div style={{
5252
display: 'flex',

src/modal/AboutModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import BugReportIcon from '@material-ui/icons/BugReport';
1313
export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
1414
const app = "NeoDash - Neo4j Dashboard Builder";
1515
const email = "[email protected]";
16-
const version = "2.0.10";
16+
const version = "2.0.11";
1717

1818
const downloadDebugFile = () => {
1919
const element = document.createElement("a");
@@ -28,7 +28,7 @@ export const NeoAboutModal = ({ open, handleClose, getDebugState }) => {
2828

2929
return (
3030
<div>
31-
<Dialog maxWidth={"lg"} open={open} onClose={handleClose} aria-labelledby="form-dialog-title">
31+
<Dialog maxWidth={"lg"} open={open == true} onClose={handleClose} aria-labelledby="form-dialog-title">
3232
<DialogTitle id="form-dialog-title">
3333
About NeoDash
3434
<IconButton onClick={handleClose} style={{ padding: "3px", float: "right" }}>

src/modal/ConnectionModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function NeoConnectionModal({ open, standalone, standaloneSetting
4545
return (
4646
<div>
4747

48-
<Dialog maxWidth="xs" open={open} onClose={() => { dismissable ? onConnectionModalClose() : null }} aria-labelledby="form-dialog-title">
48+
<Dialog maxWidth="xs" open={open == true} onClose={() => { dismissable ? onConnectionModalClose() : null }} aria-labelledby="form-dialog-title">
4949
<DialogTitle id="form-dialog-title">{standalone ? "Connect to Dashboard" : "Connect to Neo4j"}
5050
<IconButton style={{ padding: "3px", float: "right" }}>
5151
<Badge badgeContent={""} >

src/modal/DeletePageModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Tooltip } from '@material-ui/core';
1717
export const NeoDeletePageModal = ({modalOpen, onRemove, handleClose}) => {
1818

1919
return (
20-
<Dialog maxWidth={"lg"} open={modalOpen} onClose={handleClose} aria-labelledby="form-dialog-title">
20+
<Dialog maxWidth={"lg"} open={modalOpen == true} onClose={handleClose} aria-labelledby="form-dialog-title">
2121
<DialogTitle id="form-dialog-title">
2222
Delete page?
2323
</DialogTitle>

0 commit comments

Comments
 (0)