Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes While Calling from C# Codebehind #128

Open
nohainnogain opened this issue Nov 21, 2018 · 1 comment
Open

Crashes While Calling from C# Codebehind #128

nohainnogain opened this issue Nov 21, 2018 · 1 comment

Comments

@nohainnogain
Copy link

When I attempt to call the chart in C# CodeBehind, the JavaScript in d3.min crashes, due to the chart being set to NULL. When I attempt to use the onload() event, it fires perfectly, but this does not allow me to place in my calculated values to create my diagram. The only thing that I changed was in the venndiagramfigures.js, which is where I set the values for the set (I added a function called setVennValues, which takes in values for the Venn Diagram). I am calling the function in the Codebehind with the following code:

ScriptManager.RegisterStartupScript(this, GetType(), "venndiagramfigures.js", "setVennValues(); ", true);

charterror

Thank you for this great project!

@nohainnogain
Copy link
Author

nohainnogain commented Nov 30, 2018

venndiagramfigures.zip
Update: I have solved this issue! I'm honestly not too sure about why this fixed the issue, but I commented out the majority of the second Venn Diagram (my web application only needed the one) and only left the definition of the set from the second. I called the JavaScript like so:

ClientScript.RegisterStartupScript(this.GetType(), "AKey", "setVennValues();", true);

It now calls the JavaScript code from the Code Behind, as opposed to the Client Side (which is much easier to manage when the application performs a PostBack). Thanks again benfred and other collaborators, for this amazing contribution. I believe that it's the most programmer-friendly Venn Diagram generator that I've found, and successfully implemented with relative ease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant