You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,19 +38,28 @@ To build the app for production:
38
38
All NeoDash charts implement the interface defined in `src/charts/Chart.tsx`. A custom chart must do the same. the following parameter as passed to your chart from the application:
39
39
-`records`: a list of Neo4j Records. This is the raw data returned from the Neo4j driver.
40
40
-`settings`: a dictionary of settings as defined under "advanced report settings" for each report. You can use these values to customize your visualization based on user input.
41
+
-`selection`: a dictionary with the selection made in the report footer.
42
+
-`dimensions`: an array with the dimensions of the report (mostly not needed, charts automatically fill up space).
43
+
-`queryCallback`: a way for the report to read more data from Neo4j, on interactions.
44
+
-`setGlobalParameter`: a way for the report to set globally available Cypher parameters, on interactions.
41
45
42
46
Make sure that your component renders a React component. your component will be automatically scaled to the size of the report. See the other charts in `src/charts/` for examples.
43
47
44
48
### 2. Extend the config to make your component selectable
45
49
46
50
To let users choose your visualization, you must add it to the app's report configuration. This config is located in `src/config/ReportConfig.tsx`, and defined by the dictionary `REPORT_TYPES`.
47
51
48
-
To add your visualization to the config, add a new entry to the `REPORT_TYPES` dictionary with a unique name. The entry's value is an object which can contain the following fields:
49
-
- type: the React component you created. Mandatory.
50
-
- name: a display name for the visualization. Mandatory.
51
-
-`TODO - add more details here...`
52
-
53
-
If all works, please consider contributing your code to this repository. The more visualizations, the better!
52
+
To add your visualization to the config, add a new key to the `REPORT_TYPES` dictionary with a unique name. The entry's value is an object which can contain the following fields:
53
+
-`label`: a display name for the visualization. Mandatory.
54
+
-`component`: the React component that renders the visualization. Mandatory.
55
+
-`helperText`: a string that is show under the query box in the report settings. Mandatory.
56
+
-`selection`: a list that contains each of the selection boxes present in the report footer. Optional.
57
+
-`settings`: a list of selection boxes that shows under the advanced settings. Optional.
58
+
-`maxRecords`: a hard limit on the number of records the visualization can handle. Mandatory.
59
+
-`useRecordMapper`: whether to use the in-built record mapper to fix your results in a specific format. Optional.
60
+
-`useNodePropsAsFields`: whether to use the node property selector as a report footer override. Optional.
61
+
62
+
If all works, please consider contributing your code to this repository.
54
63
55
64
## Questions / Suggestions
56
65
If you have any questions about NeoDash, please reach out. For feature requests, consider opening an issue(link) on GitHub.
0 commit comments