# Data Tables

Lucid has an Action available to create a basic grid of data, much like the grid of a spreadsheet. Lucid stores the data within a JSON string, so that it may be used by any Javascript library or function which can parse JSON. The Lucid Data Action is ideal for creating data for Google Charts and includes some examples specifically for the Google library.

Once you have entered data into the table, or selected an example, you can decide where this data should go. You may enter a variable/attribute name in the 'Variable' field. Perhaps the easiest and most useful place to put the data is in the 'event' variable which is passed from each function/action to the next. For example, if in the data, you have entered data for sales figures for your company, you could enter 'event.salesfigures' as the variable. Then, if you call a Google Chart after the data, that data will be available to the Google Chart in 'event.salesfigures'. The data still needs to be converted to a format compatible with the chart, and that can be done using Google's method:
`google.visualization.arrayToDataTable(event.salesfigures)`
In the 'Data' field of the chart.

Data Tables do not need any script imports, but `google.visualization.arrayToDataTable` requires the Google Visualization script headers to be imported.

You can enter data easily by copy and pasting it from a spreadsheet application such as Numbers or OpenOffice. Simply select the data in the Spreadsheet, copy it to the clipboard using Command-C, switch back to Lucid, open the Data object, click on the Data table, and hit Command-V.