Skip to main content

I have a toggle with a custom step having two values display and value . 

Then I have a chart below which shows line chart by country 

Now in my toggle I have Bar and Line  as display and hbar and line as values. I am trying to replicate the example from Einstein learning . 

 

I am doing a binding on the chart widget Visualization type property and "hbar" is replaced by below : 

 

 "visualizationType": "{{cell(Static_Step_1.selection, 0, \"Value\").asString()}}",

 

here "0" is hardcoded on the second parameter  , but when  i choose line or bar it automatically shows me the right chart , so  binding replace the selected value , but 0 on second  parameter refers to row 0 on static item right ? so how does it work for me . 

 

Also for testing I tried to replace the above expression with column instead of cell . 

 

{{column(static_1.selection, [\"value\"]).asObject()}}

but when i preview and select line it errrors out and i cannot go back to the dashboard. 

 

Any suggestions is appreciated. 

3 réponses
  1. 3 janv. 2022, 20:18

    Column would return an array object, and you need a string for the chart type, so I would expect to see an error. cell is the easiest way to pick one value out of the column.

0/9000