Flot jQuery Library and WordPress Integration
-
Hi guys,
I’m developing a few new apps for a website I’m working on.
We’re looking to get some Flot graphs going, but I’m running into a few Javascript conflicts (I believe).
All of the javascript library’s are included correctly on the development site. Inline I’m declaring this:
<div id="monthly-graph" style="width:500px;height:280px;"></div> <script type="text/javacript"> // <![CDATA[ jQuery(document).ready(function($) { var d1 = [[0, 3], [4, 8], [8, 5], [9, 13]]; $.plot($("#monthly-graph"), [ d1, d2, d3 ]); }); // ]]> </script>
Which I believe is correct…
I know WordPress.com uses stats, but they seem to be calling it differently:
<script type="text/javascript"> // <![CDATA[ jQuery( function($) { $( '#stat-chart' ).load( 'https://dashboard.wordpress.com/wp-includes/charts/flot-stats-data.php', {"height":210,"page":"stats","chart_type":"stats-data","target":"stat-chart","blog":"xxxxx","unit":1} ); } ); // ]]> </script>
I can’t find any documentation on the .load() method – which is probably what I need.
Any help / reference points would be really appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Flot jQuery Library and WordPress Integration’ is closed to new replies.