Google Chart webcomponent: How to use "selection" property

17 views
Skip to first unread message

Andreas Bauer

unread,
Apr 7, 2019, 9:26:08 AM4/7/19
to Google Visualization API
Hi,

I try to use the Google Charts webcomponents. I followed the instruction here: https://googlewebcomponents.github.io/google-chart/components/google-chart/, but I'm failing to get the selection property working.

I have a report that contains 6 columns, but I only need two of them. As I have multiple of those reports and I don't want to create multiple version of the same report only differing in the amount of columns, I wanted to use the selection property like this.

  <google-chart  

   
type='combo'

    .
data='${data}'

   
options='{"isStacked":"true", "title":"${title}"

    , "hAxis":{"title“:“Week“ }  

    , "vAxis":{"title“:“Fruits“}  

    , "seriesType":"steppedArea"

    , "series" : {„6“:{„type":"line"}} }'


   
selection='[{"column":"4"},{"column":"6"}]'

   
>

</google-chart>



But I always end up with all 6 columns in the chart.

Best regards,

Andreas
Reply all
Reply to author
Forward
0 new messages