From 6f5e64f5254e3780c6c35bda1d3d082846412263 Mon Sep 17 00:00:00 2001 From: Kaarina Tungseth Date: Wed, 7 Apr 2021 10:32:58 -0500 Subject: [PATCH] Adds canvas `clog` function (#96418) (#96439) * Add canvas `clog` function in the doc * Add basic example to the `clog` canvcas function * clog canvas function: switch definition/purpose Co-authored-by: Laurent HUET Co-authored-by: Laurent HUET --- .../canvas/canvas-function-reference.asciidoc | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/canvas/canvas-function-reference.asciidoc b/docs/canvas/canvas-function-reference.asciidoc index 6a6c840074f02..a62f835831247 100644 --- a/docs/canvas/canvas-function-reference.asciidoc +++ b/docs/canvas/canvas-function-reference.asciidoc @@ -376,6 +376,37 @@ Clears the _context_, and returns `null`. *Returns:* `null` +[float] +[[clog_fn]] +=== `clog` + +It outputs the _context_ in the console. This function is for debug purpose. + +*Expression syntax* +[source,js] +---- +clog +---- + +*Code example* +[source,text] +---- +filters + | demodata + | clog + | filterrows fn={getCell "age" | gt 70} + | clog + | pointseries x="time" y="mean(price)" + | plot defaultStyle={seriesStyle lines=1 fill=1} + | render +---- +This prints the `datatable` objects in the browser console before and after the `filterrows` function. + +*Accepts:* `any` + +*Returns:* `any` + + [float] [[columns_fn]] === `columns`