julio15 Posted November 8, 2007 Report Share Posted November 8, 2007 Is possible to make the Chart Visible or not visible in Javascript? Example: C#: Chart1.Visible = true; (or false) Javascript: function Button1_onclick() { var chart = document.getElementById('Chart1'); chart.???? } Thanks, Quote Link to comment Share on other sites More sharing options...
maximop Posted November 9, 2007 Report Share Posted November 9, 2007 To show/hide the chart using JavaScript you can do the following: < script>function Button0_onclick() { var chart = document.getElementById('Chart1'); if (chart.Chart) chart = chart.Chart; chart.Visible = !chart.Visible; } </script>I am using the above code with a CheckBox and calling the above function from the onclick event of this object. This is what I have: < asp:CheckBox ID="CheckBox1" runat="server" Height="35px" Text="Show/Hide Chart" Width="248px" onclick="return Button0_onclick()" />Also, make sure that your browser allows JavaScript code to be executed and that if you are rendering the chart as .NET, to set the .NET Framework to "Full Trust". Quote Link to comment Share on other sites More sharing options...
julio15 Posted November 9, 2007 Author Report Share Posted November 9, 2007 Thank you very much for your response, it worked out ok, Julio CFXSilverlightDLLs.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.