Castor allows you to use multiple types of data sources. Get creative and customize your dashboard by mixing data sources!
Pssst: Webhooks support is a Pro feature. Learn everything there is to know about Webhooks in Castor on the Webhooks section of this guide.
Supported data sources include:
CSVfiles, for Table and Chart widgets
HTMLfiles, including styling, for Table Widget
ICSfiles, for Calendar Widgets
Atomfeeds, for RSS Widgets
CSV and HTML files can be stored on your server and fetched by Castor. You can paste also their content directly in the Widget Edition panel.
ICS, RSS and Atom files must be stored on a remote server and will be downloaded by Castor.
Good to know: Castor fetches its data every two minutes.
Remote Data Sources must be defined in the Widget Configuration using the URL of the file you want to display in Castor.
Castor will always try to fetch the URL from the Client's browser using the Castor Dashboard (we call that feature Local Fetch). However, if it fails, Castor Server will fetch the data.
Thanks to Local Fetch, you'll be able to use data source from local network.
Example If you have a CSV file on a server you want to use in a Chart Widget, just type in the URL of the CSV file after choosing
Remote CSVas Data source in the widget edition dialog.
If you need to include Basic Authentication to access the resource, you can include it in the URL :
Please note that
Atom feeds are always fetched by Castor Server
CORS / Server configuration for Local Fetch (Advanced)
For Local Fetch to work, the client browser will make an XHTTP request to the desired resource URL. Make sure that Cross Origin Requests are allowed from
If Cross Origin Request validation fails, Castor will automatically pipe the request to the Castor Server to ensure the data will still be downloaded.
Read more about Cross-Origin Resource Sharing and Cross-Origin Request at www.enable-cors.org
Good to know: There is no fixed rate limit using the Castor Server to fetch remote data. However, we may limit accounts that we consider abuse the service.
Using the Custom Table Widget, you can display custom tables, from CSV or HTML File. As said earlier, CSV and HTML files can be either stored on a remote server to be fetched later by Castor or you can paste the content of your file directly in the Widget edition pane.
The simplest way to display a table is to use a CSV File. The CSV File format is widely used by spreadsheets editor.
Using a CSV File with Castor
First, you'll need a CSV File. You can export a spreadsheet you edited using your favorite spreadsheet editor:
- Using Numbers on Mac, Choose File > Export… and select
- Using Excel, Choose File > Save As… and select
CSVfrom the “Save As Type” menu.
- Using Google Docs, Choose File > Download as >
Comma-separated values file (CSV)
Good to know: It's really simple to create your own CSV file, as CSV is an open text format.
Once the file is ready, you'll need to tell Castor to fetch the file to populate the widget:
- Local CSV: When editing the Custom Tables widget, just select
Custom CSVas data source. Open your CSV file with any text editor and copy the content of the file, then paste it in the
Contentbox in Castor. That's it!
- Remote CSV: Upload your file on a web server (you may want to read the note we wrote about CORS), from the Widget edition modal, choose
Remote CSVas data source, and then enter the URL of your file in the File URL field. Voilà!
CSV File Specification
Please note than when using a CSV file with Castor, first row will be used as Header.
If you need advanced customization options (title, style, colors, etc.) we recommend using an HTML table instead.
Using an HTML table is the best option when you want to create a content-rich table with custom styles and even images.
Using an HTML File with Castor
Creating an HTML file for use with Castor requires basic HTML knowledge. We will not cover the HTML file creation in this documentation.
Once your file is ready, you'll need to tell Castor to fetch the file to populate the widget:
- Local HTML: When editing the Custom Tables widget, just select
Custom HTMLas data source. Open your HTML file with any text editor and copy the content of the file, then paste it in the
Contentbox in Castor. That's it!
- Remote HMTL: Upload your file on a web server (you may want to read the note we wrote about CORS), from the Widget edition modal, choose
Remote HTMLas data source, and then enter the URL of your file in the File URL field. Voilà!
HTML File Specification
- When creating an HTML file, you can use
utags and of course
- You can specify
idattributes to your tag, to style them using custom CSS style in a
<style>tag. It's a good idea to place the
<style>tag before the
- We provide custom colors that match Castor interface, feel free to use them. The colors are
- You can use each color as a text or background color for any element. Use the class
.red) to set the text to that particular color or
.background-red) to set the element background to that color
- When referencing images, use absolute URLs. You should always load images over
With Castor, you can display custom Bar, Pie or Line charts. The Custom Chart widget sources data from a remote or local CSV file.
To learn how to link a widget to a CSV file, follow the same steps as HTML Table CSV File Setup.
The CSV file is parsed by Castor using the following rules:
- The first row is the header.
- When rendering a Bar or Line Chart:
- The first cell (first row / first column) will be used as the Chart title.
- Subsequent header cells (other cells from the first row) will be used as labels
- Colums will be used as series (first cell in line will be the series name)
Here is an example of a CSV file rendered as a Line Chart.
Castor Height, Castor A, Castor B 2008, 12, 13 2009, 13, 15 2010, 15, 20 2011, 16, 21