I embedded some Kibana visualizations in my html pages via iframe.
How can I toggle every legend on load?
Thanks
I embedded some Kibana visualizations in my html pages via iframe.
How can I toggle every legend on load?
Thanks
So you want the legend closed by default? Have you tried saving the visualizations with the legend closed? The state of the legend should be persisted in the saved visualization.
Hi Barges,
thank you for your response.
Yes, it works saving the visualization with the legend close, I'm wondering if it is possible without modifying the visualizations.
Daniele
can you paste your url you are trying to embed ?
<iframe src="https://localhost:5601/qgh/app/kibana#/visualize/edit/geosrc?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:'2017-05-20T20:21:55.159Z',mode:quick,to:'2017-05-22T10:00:00.000Z'))&_a=(filters:!(),linked:!f,query:(query_string:(analyze_wildcard:!t,query:'*')),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:geo.src,order:desc,orderBy:'1',row:!f,size:20),schema:split,type:terms),(enabled:!t,id:'3',params:(field:bytes,ranges:!((from:0,to:1000),(from:1000,to:2000),(from:2000,to:3000),(from:3000))),schema:group,type:range)),listeners:(),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,defaultYExtents:!f,legendPosition:right,mode:percentage,scale:linear,setYExtents:!f,shareYAxis:!t,times:!(),yAxis:()),title:geosrc,type:histogram))" height="600" width="800"></iframe>
for example, here you see the addLegend:!t
.... changing it to addLegend:!f
will hide it ...
Hi Peter,
I was trying with the URL:
http://localhost/app/kibana#/visualize/edit/aeff4860-3c9c-11e7-8fd2-955d1cc3b06d?embed=true&_g=(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now-12h,interval:'1h',mode:quick,timezone:Europe%2FBerlin,to:now))
Now, following your hint, I appended:
&_a=(uiState:(vis:(colors:(KO:%23BF1B00,OK:%239AC48A),legendOpen:!f)))
So I'm able to manage the legend with the field "legendOpen". Unfortunately I can't avoid tu set also the field "color" instead to use the default setting.
Thanks
just omit the colors
part ?
No, it doesn't work if I omit the "colors" part.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.