How to place a PocketQuery Google Chart within a specific div-container
As default, a Google chart is created within a its own, new div-container. Instead, it can be placed within an existing container. This can be achieved by setting the option "container" when calling PocketQuery.chart()
. A basic example would be:
## div that will contain the chart must be placed above the call of PocketQuery.chart
<div id="my-chart-div"></div>
PocketQuery.chart('Bar', {
// selecting a specific div for displaying the chart
container: '#my-chart-div'
});
More details can be found in the Javascript API section of the documentation.