diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index e8ae0bb1b..a303f5fd2 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -98,8 +98,8 @@ Generic Start *** xref:dashboards/visualizations/table.adoc[Table] *** xref:dashboards/visualizations/linechart.adoc[Line chart] *** xref:dashboards/visualizations/barchart.adoc[Bar chart] -//** xref:dashboards/advanced-features/index.adoc[Advanced features] -//*** xref:dashboards/advanced-features/parameters.adoc[Parameters and interactivity] +** xref:dashboards/advanced-features/index.adoc[Advanced features] +*** xref:dashboards/advanced-features/filters-and-parameters.adoc[Filters and parameters] //*** xref:dashboards/advanced-features/rule-based-styling.adoc[Rule-based styling] //*** xref:dashboards/advanced-features/report-actions.adoc[Report actions] //** xref:dashboards/integrations.adoc[Integrations] diff --git a/modules/ROOT/images/dashboards/parameter-in-query.png b/modules/ROOT/images/dashboards/parameter-in-query.png new file mode 100644 index 000000000..0c8d40650 Binary files /dev/null and b/modules/ROOT/images/dashboards/parameter-in-query.png differ diff --git a/modules/ROOT/images/dashboards/parameters-drawer.png b/modules/ROOT/images/dashboards/parameters-drawer.png new file mode 100644 index 000000000..adb20bc77 Binary files /dev/null and b/modules/ROOT/images/dashboards/parameters-drawer.png differ diff --git a/modules/ROOT/pages/dashboards/advanced-features/filters-and-parameters.adoc b/modules/ROOT/pages/dashboards/advanced-features/filters-and-parameters.adoc new file mode 100644 index 000000000..b67e0929f --- /dev/null +++ b/modules/ROOT/pages/dashboards/advanced-features/filters-and-parameters.adoc @@ -0,0 +1,87 @@ += Filters and parameters +:description: Use parameters in your dashboards to further customize queries or use them in filters for node and relationship properties. + + +== Parameters + +Parameters are associated with a specific dashboard. +Each parameter has a value and type both of which you can set initially. + +Display the parameters of a dashboard by using the parentheses button to show the **Parameters** drawer. + +.The parameters drawer +image::dashboards/parameters-drawer.png[] + +The drawer shows the dashboard parameters in alphabetical order. +Each parameter has an icon next to it hinting at its data type: + +* A text icon for strings, +* A hashtag icon for numbers, +* A calendar icon for dates, +* A filter icon for unspecified data types. + + +=== Creating a parameter + +. From the **Parameters** drawer, use the **Add** button. +. In the dialog, enter a parameter name, select a data type and optionally an initial value for the parameter, then **Save**. + + +=== Editing a parameter + +. From the **Parameters** drawer, hover over the parameter you wish to edit. +. Use the pen button that appears. +. In the dialog, edit the parameter name, data type and/or initial value, then **Save**. + + +=== Using a parameter in a query + +To use a parameter in a query, use the parameter name prefixed with `$`, for example `$example_number_param` for the parameter with name "example_number_param". + +.Using a parameter in a query +image::dashboards/parameter-in-query.png[] + + +=== Deleting a parameter + +. From the **Parameters** drawer, hover over the parameter you wish to edit. +. Use the trash bin button that appears. + + +== Filters + +Filters are special xref:dashboards/working-with-dashboards/managing-dashboards.adoc#_dashboard_cards[cards] and you can add them to your dashboards in a similar fashion. + +You can use a filter to dynamically set parameter values inside queries. + + +== Adding a filter + +. In the **Dashboards** page, use **Add filter** at the bottom right. +. In the **Add filter** dialog, select a filter type: a node or relationship type, and a property. +. Use either an existing parameter or create a new one, then **Save**. + + +== Editing a filter + +. In the **Dashboards** page, use the three dots icon of the filter you wish to edit and select **Edit filter**. +. Edit your filter and **Save**. + + +== Deleting a filter + +In the **Dashboards** page, use the three dots icon of the filter you wish to edit and select **Delete**, then confirm. + + +//== Highlight all cards using a filter +// +//In the **Dashboards** page, use the target icon of a filter to highlight all cards that make use of this particular filter. + +// screenshot + +//// +== Use a filter in a card + +Lorem ipsum. +//// + diff --git a/modules/ROOT/pages/dashboards/advanced-features/index.adoc b/modules/ROOT/pages/dashboards/advanced-features/index.adoc index ca7058f9d..ca648b2b9 100644 --- a/modules/ROOT/pages/dashboards/advanced-features/index.adoc +++ b/modules/ROOT/pages/dashboards/advanced-features/index.adoc @@ -1,4 +1,4 @@ = Advanced features -:description: The advanced features of Neo4j dashboards. +:description: Advanced features of Neo4j dashboards. -Coming soon. \ No newline at end of file +Explore the advanced features offered by Neo4j dashboards. \ No newline at end of file diff --git a/modules/ROOT/pages/dashboards/advanced-features/parameters.adoc b/modules/ROOT/pages/dashboards/advanced-features/parameters.adoc deleted file mode 100644 index 696c14e89..000000000 --- a/modules/ROOT/pages/dashboards/advanced-features/parameters.adoc +++ /dev/null @@ -1,4 +0,0 @@ -= Parameters and interactivity -:description: Parameterize your Aura dashboards and let their constituents interact with each other. - -Coming soon. \ No newline at end of file diff --git a/modules/ROOT/pages/dashboards/working-with-dashboards/managing-dashboards.adoc b/modules/ROOT/pages/dashboards/working-with-dashboards/managing-dashboards.adoc index 7a52b8576..1ece006e0 100644 --- a/modules/ROOT/pages/dashboards/working-with-dashboards/managing-dashboards.adoc +++ b/modules/ROOT/pages/dashboards/working-with-dashboards/managing-dashboards.adoc @@ -12,13 +12,13 @@ In Neo4j Aura, click **Dashboards** under **Tools** in the left-side navigation == Editing a dashboard -. Select a dashboard tile from the the **Dashboards** page. +. Select a dashboard tile from the **Dashboards** page. . To change the title, select the title text and edit it, then confirm. === Dashboard pages -Select a dashboard tile from the the **Dashboards** page. +Select a dashboard tile from the **Dashboards** page. Dashboard pages are organized as tabs. A new dashboard contains a single page "Main page". You can edit or duplicate the page via hovering the page name and using the three dots icon. @@ -28,13 +28,28 @@ Additional pages can also be deleted from the three dots menu. === Dashboard cards -A dashboard page consists of cards. +A dashboard page can hold any number of cards. Each card can hold a xref::/dashboards/visualizations/index.adoc[visualization], also referred to as the **Chart type**. -To add a card, use **Add card* at the bottom right. +To add a card, use **Add card** at the bottom right. Use the three dots at the top right of a card to edit the card. Click the six dots at the top left of a card to drag and drop it within the grid of the page. +=== Dashboard filters + +A dashboard page can hold filters. +A filter is a special type of card reserved for parameters used to filter data retrieved from your database. +See xref:dashboards/advanced-features/filters-and-parameters.adoc#_filters[filters] for more information. +To add a filter, use **Add filter** at the bottom right. +Use the three dots at the top right of a filter to edit the filter. +Click the six dots at the top left of a filter to drag and drop it within the grid of the page. + + +=== Dashboard parameters + +See xref:dashboards/advanced-features/filters-and-parameters.adoc#_parameters[parameters]. + + //// == Loading a dashboard diff --git a/package-lock.json b/package-lock.json index 29c8f918e..7b29c028f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -306,7 +306,8 @@ "node_modules/@neo4j-antora/antora-modify-sitemaps": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/@neo4j-antora/antora-modify-sitemaps/-/antora-modify-sitemaps-0.4.4.tgz", - "integrity": "sha512-IkXoilOJquZPB5G5ZhrgfSN6U3E2YToWakehtF55RA+CNQS0KboTAB2vUH01+Tkmkd8K6UElf41A6cGnnrvs0g==" + "integrity": "sha512-IkXoilOJquZPB5G5ZhrgfSN6U3E2YToWakehtF55RA+CNQS0KboTAB2vUH01+Tkmkd8K6UElf41A6cGnnrvs0g==", + "license": "MIT" }, "node_modules/@neo4j-antora/antora-table-footnotes": { "version": "0.3.3", @@ -965,6 +966,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/fast-redact": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz", @@ -3242,9 +3255,19 @@ "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", + "glob-parent": "6.0.2", "merge2": "^1.3.0", "micromatch": "^4.0.8" + }, + "dependencies": { + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "requires": { + "is-glob": "^4.0.3" + } + } } }, "fast-redact": {