CSV Connection
Steps to develop a data connection based on the CSV file.
Check out the given walk-through on how to create the CSV data connection and associated it with a charting component.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252F3xtaFTjzHCRxJ6jCgLTT%252FCSVConnection.gif%3Falt%3Dmedia%26token%3D13086298-867f-40e8-92f6-221ee845dbd3&width=768&dpr=4&quality=100&sign=eb3ba586&sv=1)
Please Note: Click the Data Connector icon provided on the right side of the canvas, and view the database connectivity options.
Creating a New CSV Connection
Click the Data Connectors icon to display all the available data connector types.
Click the Create New Connection icon provided next to the CSV option.
A new connection gets added under the CSV connection type.
Click the connection to display the connection-specific details.
Configure the following information:
Name: Name the connection.
Browse: Click the Browse icon to browse a CSV file.
Load at Start: Enable this option to get the updated data from the data source before loading it into charts.
The Field Set tab displays all the fields after establishing the data connection.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252F8ryO13cSRYYs0lBkVDCH%252Fimage.png%3Falt%3Dmedia%26token%3Df3535f39-be77-4fa5-a430-215197cc0086&width=768&dpr=4&quality=100&sign=bc154d5d&sv=1)
Condition
Select the Condition tab.
Provide a condition to be applied as a filter on the selected data by putting a checkmark in the given box.
E.g., As displayed in the following image, specific date has been provided under the Conditions column for the Timeline so, data for the given date will be taken.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252FXzYZinK7VgkfpFF8Uyjw%252Fimage.png%3Falt%3Dmedia%26token%3D07e655fc-d124-4ced-9e8e-798ef4219ed0&width=768&dpr=4&quality=100&sign=a51c5f8e&sv=1)
Calculated Fields
The users can add a calculated field by using this tab.
Navigate to the Data Connectors page.
Create a connection by selecting a specific Data Connector type.
Connect to the desired data source to access the available fields.
Click the Calculated Fields tab.
The Calculated Field Editor dialog box opens.
Name: Provide a name for the calculated field
Script Editor: Use the Script Editor space to insert the desired calculation formula using the rule given below.
Click the Create option to create the calculated field.
Please Note:
Enclose field names in square brackets: [total_sales]/[number_of_items]
Enclose global variable in curly braces: {bar1.profit}*2+[profit_jan]
The newly created calculated field gets added under the Calculated Fields tab.
Script on Load for a Data Connection
The users can apply their modifications or preferences at the connection level using the Scripting window to get the modified data.
Navigate to the Data Connectors page.
Select a Data Connector type.
Create a new Connection and configure it.
Select the Script on Load icon provided next to the connection.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252FzQ2OYwPCQpeEFWCpvF0X%252Fimage.png%3Falt%3Dmedia%26token%3D26ff21f0-41fe-4bc3-a184-88a98392bca2&width=768&dpr=4&quality=100&sign=1e1da3b7&sv=1)
The Script tab appears to trigger a script to produce some action on the data connection.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252FwYMLXG8mq8wCg9v5DXVC%252Fimage.png%3Falt%3Dmedia%26token%3D9e2862af-d51e-4b63-be97-00261edc7a20&width=768&dpr=4&quality=100&sign=cb50552d&sv=1)
The user can also use a script for the Dashboard, which can be accessed via the Components tab.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252F14zs5QyhVTLYhTiNGMXA%252Fimage.png%3Falt%3Dmedia%26token%3D48be3a6b-8991-4daf-b36b-b94a5d418321&width=768&dpr=4&quality=100&sign=a2ffc28a&sv=1)
The user can search the script for the Dashboard, which can be accessed via the Script tab.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252FaLFxQBlKne0DCXQC3WFX%252Fimage.png%3Falt%3Dmedia%26token%3Db1022328-5add-46bd-9252-ff8919b08160&width=768&dpr=4&quality=100&sign=64a8098b&sv=1)
Opening the Scripting Help/ Advanced Scripting
Click the Help icon from the Script on the Load page.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252FidMuKSCpULgNHcZ7NcaL%252Fimage.png%3Falt%3Dmedia%26token%3D8bc56bc0-ca7e-411d-8798-48c9f318d880&width=768&dpr=4&quality=100&sign=6e82f167&sv=1)
The Scripting Help tab opens with some predefined scripts.
Click the Advanced Scripting option to display the chart-wise advanced scripts.
![](https://docs.bdb.ai/~gitbook/image?url=https%3A%2F%2F859511478-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FGDmsjfjJBNqow7Fo97cO%252Fuploads%252FOTBYXFYoPpz4WoMkDaDE%252Fimage.png%3Falt%3Dmedia%26token%3Da7baa0d6-09a9-4c2a-9382-63150d619871&width=768&dpr=4&quality=100&sign=1563eba4&sv=1)
Last updated