Sign in to follow this  

Fusion Charts Conflict? My Function Is Not A Function...

Recommended Posts

Hi there,


I'm using Fusion charts and I'm possibly getting a conflict with some code I have created for some tooltips.


The message it is sending is


Error: $(".oss-toolTip").betterTooltipTwo is not a function

Source File: file:///C:/Users/Nick/Downloads/BillingOverviewissue/billing-overview_files/scripts.js

Line: 19


When I remove my fusioncharts code, this error does not occur and the code works fine.


Can anyone help me with the issue?

My fusioncharts code:

	<script type="text/javascript" src="billing-overview_files/FusionCharts.htm"></script>
<script language="JavaScript">
 	//FC_Rendered method is called whenever a FusionCharts chart on the page
 	//has finished initial rendering. To this function, the chart passes its 
 	//own DOM Id.
 	function FC_Rendered(DOMId){
    	//If it's our required chart
    	if (DOMId=="myChartId"){
        	//Get reference to the chart object
       	var chartObj = FusionCharts("myChartId");  
       	//Simply alert the CSV Data 
      	return chartObj.getDataAsCSV();
 	function downloadChartData(domId) {
     	document.location.href="chart-data-download.htm?csvData= " +  FC_Rendered(domId);

<script type="text/javascript" src="billing-overview_files/jquery-1.htm"></script>

<div id="chartContainer"><object style="visibility: visible;" id="myChartId" data="billing-overview_files/MSLine.htm" class="FusionCharts" type="application/x-shockwave-flash" width="700" height="300" lang="EN"><param value="noScale" name="scaleMode"><param value="noScale" name="scale"><param value="opaque" name="wMode"><param value="always" name="allowScriptAccess"><param value="best" name="quality"><param value="lang=EN&debugMode=0&animation=undefined&DOMId=myChartId&registerWithJS=1&chartWidth=700&chartHeight=300&InvalidXMLText=Invalid data.&stallLoad=true&dataXML=&dataURL=data.jsp" name="flashvars"></object></div>   
<script type="text/javascript">   	
 	var myChart = new FusionCharts( "FusionCharts/MSLine.swf", 
 	"myChartId", "700", "300", "0", "1" );


My tooltip code is

jQuery.fn.betterTooltipTwo = function(options){
	var tip = $('.oss-toolTip');	
	/* Mouse over and out functions*/

		function() {
			var offset = $(this).position();
			var tLeft = offset.left; 
			var tTop =; 
			var tTop = (tTop+20) + 'px';
			var linkWidth = ($(this).width()) / 2; 
			var tLeft = (tLeft-170+linkWidth)+"px";

			if ($(this).next('.oss-toolTip').is(':visible')) {
				var thisHref = $(this).attr('href');
				var startTooltip = '<span class="tooltip"><span class="tooltip-top"></span><span class="tooltip-content"><a href="#" class="tooltip-close"><span>close</span></a>';
				var endTooltip = '</span></span>';
				var ourTooltip = startTooltip + $(thisHref).html() + endTooltip;
				$(this).next('.oss-toolTip').css({'top' : tTop, 'left' : tLeft});

				function() {
					return false;
		return false;



Thanks in advance,



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this