Create a Custom Chart Using the CLI
This applies to: Visual Data Discovery
A complete example of creating a custom chart using the custom chart CLI can be found in A Custom Chart Tutorial.
vnd.composer.v3+json
as the Content-Type
for API routes.
Create a custom chart locally using the custom chart CLI
- Open the Symphony CLI.
-
Run the following command to create the visual.
$ cmp-chart init <path-to-visual>
Optionally, you can provide a type parameter. Valid values are
single-group
,multi-group,
orraw
. The default issingle-group
. For example:$ cmp-chart init -t multi-group <path-to-visual>
The cmp-chart init
command creates a directory in the specified path containing the files you need to get started. Here is a preview of the directory tree:
The following table describes the function of each file in the tree:
File | Description |
---|---|
|
Lists the packages your visual depends on. For more information, see https://docs.npmjs.com/creating-a-package-json-file. |
|
Your visual's CSS (style sheet) code. |
|
Your visual's JavaScript code. Additional files can be used and imported into this file. |
|
Contains the name, controls, and variables of your visual. |
|
The webpack configuration. Webpack is used in visuals to bundle your code into a single file. |
Comments
0 comments
Please sign in to leave a comment.