Skip to content

bigfunctions > chart

chart

Signature

chart(data, chart_type, ylabel)

Description

Return html with a chartjs chart

See the result as a data visualization in BigQuery Console!

The result of this function can be vizualized as an html report directly in BigQuery Console!

  1. Install this bookmarklet: bigfunctions (it has to be done only once)
  2. Open BigQuery console
  3. Click on the installed bookmarklet.
    • From now on, the bookmarklet code will observe the BigQuery console page.
    • If a BigQuery result appears with a unique cell containing html content, it will be rendered.
  4. You will have to click on the bookmarklet again:
    • If you refresh the Bigquery console page,
    • If you open the BigQuery console in a new tab of your browser.
  5. Run the query of the example and open the result of the latest subquery. The result will be shown as a nice html content.


bookmarklet usage

Examples

select bigfunctions.eu.chart([('2022-08-01', 10000.), ('2022-08-02', 20000.), ('2022-08-03', 40000.), ('2022-08-04', 80000.)], 'bar', 'sales')
select bigfunctions.us.chart([('2022-08-01', 10000.), ('2022-08-02', 20000.), ('2022-08-03', 40000.), ('2022-08-04', 80000.)], 'bar', 'sales')
select bigfunctions.europe_west1.chart([('2022-08-01', 10000.), ('2022-08-02', 20000.), ('2022-08-03', 40000.), ('2022-08-04', 80000.)], 'bar', 'sales')

screenshot