This project is read-only.

mootools support?

Apr 3, 2012 at 3:23 PM

Is there any mootools support?

Apr 4, 2012 at 9:40 PM
Edited Apr 4, 2012 at 9:49 PM

I found it pretty simple to switch out the syntax for Mootools support.  I simply replaced lines 291 and 292 in Highcharts.cs for ToHtmlString() with the following.  I first tried using both jQuery and Mootools by putting jQuery in noConflict mode because highcharts was not working with mootools for me.  I later realized that I was using an incompatible version of mootools and that was causing my charts from not rendering.


scripts.AppendLine("var {0};".FormatWith(Name));

scripts.AppendLine(!string.IsNullOrEmpty(FunctionName) ?string.Format("function {0}() {{", FunctionName) : "$(document).ready(function() {");

modification to put jQuery in noConflict() mode:


scripts.AppendLine("var {0};".FormatWith(Name));

scripts.AppendLine(!string.IsNullOrEmpty(FunctionName) ? string.Format("function {0}() {{", FunctionName) : "jQuery(document).ready(function() {");

modification to support mootools:

scripts.AppendLine(!string.IsNullOrEmpty(FunctionName) ? string.Format("function {0}() {{", FunctionName) : "window.addEvent('domready', function() {");

scripts.AppendLine("\tvar {0};".FormatWith(Name));

It would be nice to see this implemented in the next version with options to pick your desired js library.

Apr 5, 2012 at 11:24 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Apr 5, 2012 at 11:25 PM

Thanks for sharing your solution. It will be included in one of the next releases.