From 9155a9d29360e82a6cbf7fecde36fd22d768dd7c Mon Sep 17 00:00:00 2001 From: Julia Nocera Date: Wed, 7 Apr 2021 17:06:59 -0700 Subject: [PATCH 1/2] Adds the new `account-id` type We've got a new field type for Visualization configuration fields. The CLI supports the new field type, but the UI doesn't yet so this PR is not quite ready to merge. Just getting into place for after we update the Custom Visualizations UI. --- src/markdown-pages/build-apps/build-visualization.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/markdown-pages/build-apps/build-visualization.mdx b/src/markdown-pages/build-apps/build-visualization.mdx index 48aa0cb04..ada0c9bf2 100644 --- a/src/markdown-pages/build-apps/build-visualization.mdx +++ b/src/markdown-pages/build-apps/build-visualization.mdx @@ -94,6 +94,7 @@ The `nr1.json` file provides metadata. The `configuration` key in this metadat - `json` - `enum`: a developer-defined list of string options. - `nrql`: a single NRQL query string. +- `account-id`: a New Relic account picker will be shown. - `namespace`: a group of input fields to be displayed together under a shared heading in the prop-editing UI. - `collection`: a repeatable group of input fields to be displayed together under a shared heading in the prop-editing UI. The `nrqlQueries` entry is an example of a collection type. From 2f72b318d5cb8ba963042b55e425d301008df74a Mon Sep 17 00:00:00 2001 From: Julia Nocera Date: Mon, 12 Apr 2021 08:49:50 -0700 Subject: [PATCH 2/2] Replace config block with link to information Thanks to @alexronquillo, we now have a [full entry on the configuration options available](https://developer.newrelic.com/explore-docs/custom-viz/configuration-options) and how they map to the UI and visualization user experience. Per Alex's suggestion, it makes sense to replace the quick view of configuration with a link to this guide. --- .../build-apps/build-visualization.mdx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/markdown-pages/build-apps/build-visualization.mdx b/src/markdown-pages/build-apps/build-visualization.mdx index ada0c9bf2..29f6bc42a 100644 --- a/src/markdown-pages/build-apps/build-visualization.mdx +++ b/src/markdown-pages/build-apps/build-visualization.mdx @@ -86,17 +86,7 @@ As a result, you have a new visualization directory matching the name you gave y The files created provide an example visualization – a radar chart populated by a basic NRQL query. -The `nr1.json` file provides metadata. The `configuration` key in this metadata defines the prop-input fields to be shown in the UI. These are the fields users will fill in to create an instance of the visualization. Supported input types are: - -- `boolean` -- `string` -- `number` -- `json` -- `enum`: a developer-defined list of string options. -- `nrql`: a single NRQL query string. -- `account-id`: a New Relic account picker will be shown. -- `namespace`: a group of input fields to be displayed together under a shared heading in the prop-editing UI. -- `collection`: a repeatable group of input fields to be displayed together under a shared heading in the prop-editing UI. The `nrqlQueries` entry is an example of a collection type. +The `nr1.json` file provides metadata. The `configuration` key in this metadata defines the prop-input fields to be shown in the UI. To learn more about the options available under the `configuration` key, check out the [Configure your custom visualization](/explore-docs/custom-viz/configuration-options) article. The `index.js` file is where you define the React component that receives the props and renders the visualization. You can install and import any JavaScript libraries you find useful. The example component imports [Recharts](https://recharts.org), a library that wraps [D3](https://d3js.org) submodules for easy-to-compose visualizations.