Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to implement the use of jQuery's various graphing libraries (jqPlot in particular) to produce a simple graph (bar, line) onto the Content Editor Web Part, but SharePoint 2010 doesn't seem to be rendering the graph. I know the graphing code works because I'm able to produce the graph when running the javascript/jQuery as an HTML page. I'm wondering if there is anything within SharePoint that I don't know of that is not allowing the graphs to appear? Here is where I'm at right now:

I have a content editor web page with the following embedded in the HTML source:

div id="chartdiv" style="height:#;width...

I then have the content link pointing to a file which contains all my javascript & jQuery libraries as well as my basic jqPlot code. The jqPlot code is as simple as the following (http://www.jqplot.com/tests/line-charts.php):

var plot1 = $.jqplot ('chartdiv', [[3,7,9,1,4,6,8,2,5]]);

Important to note that the "chartdiv" points to the provided in my content editor web part. The Web Part creates the specified dimensions for the chart, but does not load the line graph. One possibility for this is when this same code is run as an HTML file, IE, the following message is produced:

"Internet Explorer restricted the page from running scripts or ActiveX Controls"

I then select "Allow" and the graph is produced. I understand there are quick apps to develop charts, but I want to implement the specific features that jQuery has to offer.

Any help or advice that anyone has to offer would be greatly appreciated. Thank you.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.