Embedding Charts and Creating Dashboards
Select the chart you want to embed in the ChartBuilder index.php
page. Select the 'Embed' link below the chart.
ChartBuilder can support multiple MySQL databases. Edit
the databases.php file stored in the /config folder using the example
in the file as a guide. Optionally, you can use the
following advanced parameters as well:
- height
- Chart height in pixels. If omitted, the chart will
be 450px. Use only number, do not include "px."
- width
- Chart width in pixels. If omitted, the chart will
be 600px. Use only number, do not include "px."
- showsql
- If set to 1, the SQL for the chart will be displayed
below the chart.
- table
- If set to 1, a data table related to the chart will be
displayed below the chart.
- timestamp
- If set to 'no', the timestamp will no be displayed below
the chart.
- filter
- If the constant 'AllowParamFilter' is set to 1 in
library.php you can pass in a SQL where clause that will be
appended to the chart SQL. We recommend you only set
'AllowParamFilter' if you are using ChartBuilder internally
and trust other users will not misuse the parameter.
At this time the filter is added to the SQL without
evaluation.
- database
- If provided, ChartBuilder will override the database
defined in the chart definition, and will attempt to query
the database specified in the URL parameter.
- datasource
- If provided, ChartBuilder will override the datasource
(table/view) defined in the chart definition, and will
attempt to query the datasource specified in the URL
parameter.
Create an iframe on your web page and set
the src tag to the URL from step 2 above.