Jump to content
Software FX Community

Javascript problem with Chart


julio15

Recommended Posts

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".

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...