Home
Analytics
chart visibility format dynamically change at client side?
Venu_Bachwale
Hi,
I see Visibility allows to hide certain given format [pdf->rue] meaning, it hide for pdf and visible to all other format.
that is fine; I want to change expression and format at client side depends on other user selection/action.
I want to handle these visibility property at any of client side exposed methods example, beforeRendering, beforedraw
please help me with code snippet and give a reference where already it is explained...
Thanks in Advance
Find more posts tagged with
Magellan BI & Reporting
Comments
Venu_Bachwale
HI
at client side, if I use
$("#container_drilldown1").attr("style", "width: 573pt; height: auto; min-height: 286.5pt; display:
block
; overflow: hidden; visibility:
visible
")
chart drilldown1 is set as visibility hide for only html,xhtml; and exporting pdf, contain this drilldown1
Where as display none <-> block can be handled at client side but, visibility is not able to handled at client side?
....................
I interest to know what BIRT is doing with Visibiltiy property?
below html code handle both display and visibility styles properly as expected; I expect same in birt chart even;
.....................
<!DOCTYPE html>
<html>
<body>
<p id="myP1">This A is some text for hide. <br/> nwe line changed<br/></p>
<p id="myP2">This B is some text for visibility.<br/> nwe line changed<br/></p>
<input type="button" onclick="demoDisplay()" value="Hide text with display property"/>
<input type="button" onclick="demoVisibility()" value="Hide text with visibility property">
<br/>
<input type="button" onclick="doDisplay()" value="Show text with display property"/>
<input type="button" onclick="doVisibility()" value="Show text with visibility "/>
<script>
function demoDisplay() {
document.getElementById("myP1").style.display = "none";
}
function demoVisibility() {
document.getElementById("myP2").style.visibility = "hidden";
}
function doDisplay() {
document.getElementById("myP1").style.display = "inline";
}
function doVisibility() {
document.getElementById("myP2").style.visibility = "visible";
}
</script>
</body>
</html>
jfranken
Hi Venu,
Do you want to make dynamic changes to the CSS on the client and have those changes take effect when exporting to PDF? I do not think that is possible without generating the report again. Didn't you open a support ticket recently related to this issue? If it is the same issue, I believe Austin filed an engineering request on your behalf.
jfranken
Hi Venu,
Attached is an example that toggles visibility when a chart is clicked. The code is in the first chart's script tab and the other charts have bookmarks that are referenced in the code. If you need other functionality, please let me know what you need.
Venu_Bachwale
Hi
@jfranken
I need to handle visibility setting on Chart which is hide for (all or specific outputs) initially.
toggle handle the display property which is not my intention right now;
Attached report where usachart is enabled visibility to be hidden for all formats;